|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--asgaard.utils.log.LogBroker
This is the Collector (and distributor) for all Log-statements based on LogMsg-Beans.
LogMsg
Field Summary | |
static java.lang.String |
CONNECT_STRING
Used flatfile-driver |
static java.lang.String |
local_path
Path to the Logfile (may be modified before instantiation). |
static java.lang.String |
LOG_FILE_EXTENSION
Used flatfile-file-extension |
static java.lang.String |
LOG_FILE_NAME
Used flatfile-filename |
static java.lang.String |
MAIL_SUBJECT
Used prefix of the mail-subject (used if mailclient active) |
static java.lang.String |
VERSION
|
Constructor Summary | |
LogBroker()
Creating a LogBroker Object with the default settings, LOGFILE is chreated automatically if nessecary. |
|
LogBroker(java.lang.String path)
Creating a LogBroker, LOGFILE is chreated automatically if nessecary. |
Method Summary | |
LogMsg[] |
get(java.util.Date date,
byte type,
boolean withBean)
Gets a Statement from the LOGFILE returning the Statement-bean. ( |
LogMsg[] |
get(long nr,
boolean withBean)
Gets a Statement from the LOGFILE returning the Statement-bean. |
byte |
getMailLevel()
Get the current MailLevel |
void |
put(LogMsg stmt)
Puts a Statement into the LOGFILE returning the (modified) Statement-bean. |
void |
setMailServer(byte level,
java.lang.String to,
java.lang.String from,
java.lang.String cc,
java.lang.String mailhost,
long size)
Defines a Mailserver for automatically forward LOGMSG also via eMail. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final java.lang.String VERSION
public static final java.lang.String CONNECT_STRING
public static final java.lang.String LOG_FILE_NAME
public static final java.lang.String LOG_FILE_EXTENSION
public static final java.lang.String MAIL_SUBJECT
public static java.lang.String local_path
Constructor Detail |
public LogBroker() throws java.sql.SQLException, java.io.IOException
public LogBroker(java.lang.String path) throws java.sql.SQLException, java.io.IOException
Method Detail |
public void setMailServer(byte level, java.lang.String to, java.lang.String from, java.lang.String cc, java.lang.String mailhost, long size)
level
- Which Error-Level should be forwardedto
- mailto - eMailadressfrom
- eMailadresscc
- carbon copy (optional)mailhost
- assumption: mail.smtp.hostlogsize
- send warning if logfile exceeds size (0 for no warning)public byte getMailLevel()
LogMsg
public void put(LogMsg stmt) throws java.sql.SQLException, java.io.IOException
stmt
- Statement as a LogMsg-BeanLogMsg
public LogMsg[] get(long nr, boolean withBean)
nr
- Number of the statement in the current LogfilewithBean
- if the Bean carried by the Statement is requiredLogMsg
public LogMsg[] get(java.util.Date date, byte type, boolean withBean)
date
- minimum date of the statement in the current Logfiletype
- minimum type of the statement in the current LogfilewithBean
- if the Bean carried by the Statement is requiredLogMsg
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |