|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--asgaard.utils.log.LogClient
LogClient is a wrapper for local and remote Logserver and does the Exception-handling.
To guarantee a minimum performance this is implemented as Thread
which can be used or not as a Thread
.
Fields inherited from class java.lang.Thread |
MAX_PRIORITY,
MIN_PRIORITY,
NORM_PRIORITY |
Constructor Summary | |
LogClient(java.lang.String pre,
boolean start)
Creates a local LogClient, wrapping a local Logfile with the default directory. |
|
LogClient(java.lang.String pre,
java.lang.String server,
boolean start)
Creates a local LogClient, wrapping a remote Logserver. |
|
LogClient(java.lang.String pre,
java.lang.String localPath,
byte mailLevel,
java.lang.String mailTO,
java.lang.String clientName,
java.lang.String mailCC,
java.lang.String mailHOST,
long size,
boolean start)
Creates a local LogClient, wrapping a local Logfile and setup a mailclient. |
Method Summary | |
LogMsg[] |
get(long nr,
boolean withBean)
Gets a Statement from the wrapped LOGFILE returning the Statement-bean. |
boolean |
isRemote()
Is the current Logfile remote? |
void |
put(LogMsg stmt)
Puts a Statement into the wrapped LOGFILE. |
void |
put(java.lang.String server,
java.lang.String point,
byte typ,
boolean ok,
java.lang.String msg)
Creates a Statement out of the Message If any Exception rises it will be ignored |
void |
put(java.lang.String server,
java.lang.String point,
byte typ,
boolean ok,
java.lang.String msg,
java.lang.Object bean)
Creates a Statement out of the Message If any Exception rises it will be ignored |
void |
putBackup(java.lang.String server,
java.lang.String point,
java.lang.String msg,
java.lang.Object bean)
Creates a Backup-Statement out of the Message If any Exception rises it will be ignored |
void |
run()
Does the work for put as a Thread |
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.Thread |
activeCount,
checkAccess,
countStackFrames,
currentThread,
destroy,
dumpStack,
enumerate,
getContextClassLoader,
getName,
getPriority,
getThreadGroup,
interrupt,
interrupted,
isAlive,
isDaemon,
isInterrupted,
join,
join,
join,
resume,
setContextClassLoader,
setDaemon,
setName,
setPriority,
sleep,
sleep,
start,
stop,
stop,
suspend,
toString,
yield |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public LogClient(java.lang.String pre, boolean start) throws java.io.IOException, java.sql.SQLException
pre
- prefix printed to System.err in case of an Exceptionstart
- runs the LogClient as Threadpublic LogClient(java.lang.String pre, java.lang.String localPath, byte mailLevel, java.lang.String mailTO, java.lang.String clientName, java.lang.String mailCC, java.lang.String mailHOST, long size, boolean start) throws java.io.IOException, java.sql.SQLException
pre
- prefix printed to System.err in case of an ExceptionlocalPath
- path for the local logfilemailLevel
- mail statements up to specified levelmailTO
- adress of to send the statementsclientName
- name of the client-task (\@[host] is added automatically)mailCC
- adress of to send the statementsmailHOST
- mail hostsize
- maximum size of the logfilestart
- runs the LogClient as Threadpublic LogClient(java.lang.String pre, java.lang.String server, boolean start) throws java.io.IOException, java.sql.SQLException
pre
- prefix printed to System.err in case of an Exceptionserver
- name of the Logserver hoststart
- runs the LogClient as ThreadMethod Detail |
public void run()
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 void put(LogMsg stmt)
stmt
- Statement as a LogMsg-BeanLogMsg
public void put(java.lang.String server, java.lang.String point, byte typ, boolean ok, java.lang.String msg)
server
- The calling Java-Serverclasspoint
- The Method / place where the statement was createdtyp
- The Type of the LOG-Statementok
- Was the ServicePoint passed successfulymsg
- Human redable Message of the StatementLogMsg
public void put(java.lang.String server, java.lang.String point, byte typ, boolean ok, java.lang.String msg, java.lang.Object bean)
server
- The calling Java-Serverclasspoint
- The Method / place where the statement was createdtyp
- The Type of the LOG-Statementok
- Was the ServicePoint passed successfulymsg
- Human redable Message of the Statementbean
- Some streamable ObjectLogMsg
public void putBackup(java.lang.String server, java.lang.String point, java.lang.String msg, java.lang.Object bean)
server
- The calling Java-Serverclasspoint
- The Method / place where the statement was createdtyp
- The Type of the LOG-Statementok
- Was the ServicePoint passed successfulymsg
- Human redable Message of the Statementbean
- Some streamable ObjectLogMsg
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 boolean isRemote()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |