| java.lang.Object Shared.Logging.Internal.GenericLogger
All known Subclasses: Shared.Logging.Internal.SocketLogger, Shared.Logging.Internal.FileLogger, Shared.Logging.Internal.ConsoleLogger,
GenericLogger | abstract public class GenericLogger (Code) | | This is the basis class, which is extended by
the other loggers and is responsible for the
created log text, which then is treated differently
by the child loggers:
ConsoleLogger: writes it to the System.out stream
FileLogger: writes it into log files
SocketLogger: sends it over the internet
Child loggers have to implement the abstract method
publish( String levelName, String message ) and can get
the log text by a call to the protected method
getLogText( String levelName, String message ).
|
GenericLogger | public GenericLogger(String _logIdentifier)(Code) | | |
getLogText | protected synchronized String getLogText(String levelName, String message)(Code) | | Builds the log text.
It is supposed, that child loggers call this to get
the log text, and then proceed differently with that.
It is synchronized, because a member attribute is used
as working variable, so that the same reference is used always,
and the code does not create and set new references for each call.
|
getThrowableText | protected synchronized String getThrowableText(String levelName, Throwable throwable)(Code) | | The same for throwables (Exceptions, Errors)
|
publish | abstract public void publish(String levelName, String message)(Code) | | To be implemented by child loggers.
|
publish | abstract public void publish(String levelName, Throwable throwable)(Code) | | To be implemented by child loggers.
|
publishDirectly | abstract public void publishDirectly(String message)(Code) | | To be implemented by child loggers.
This one just logs the message directly without any formatting.
|
setDateFormatPattern | public synchronized void setDateFormatPattern(String pattern)(Code) | | Changes the date format pattern.
Parameters: pattern - the new pattern.See the SimpleDateFormat constructor comments forpossible contents of pattern. |
setLogIdentifier | public synchronized void setLogIdentifier(String newLogIdentifier)(Code) | | Called from Log for changing the log identifier.
|
terminate | abstract public void terminate()(Code) | | This is called by the Logs shutdown hook.
The logger must close any open streams and if required
do further cleanup. The JVM will shutdown short time
after this call.
|
|
|