Package org.jscience.util.logging

This package contains classes that implement a custom logging for this framework - separate from java.util.logging.


Interface Summary
LogEntryFormatter allows for several LogWriters to share the same formatting
LogExceptionHandler A LogExceptionHandler is used to control the behavior of a Logger in regards to occuring LogException events.
LogWriter The LogWriter interface defines objects that can be used as a handler for the Logger class.

Class Summary
AbstractLogWriter provides filtering capabilities for a LogWriter.
BinaryFileLog A LogWriter that logs the entries synchronously serialized to a file.
BinaryLogFormatter formats the LogEntry as a serialized byte array.
ConsoleLog ConsoleLog prints abbreviated log messages to the console using System.out.println().
DBLineLogFormatter formats a LogEntry into a format that can be easily imported into databases.
JDBCLogWriter JDBCLogWriter provides a LogWriter that writes to a java.sql.Connection.
JTextComponentLog JTextComponentLog writes abbreviated log messages into a given JTextComponent synchronously.
Level Level classifies the logging of LogEntry objects.
LevelFilter filters LogEntry objects by their level using the natural order of Level objects
LogEntry LogEntry represents a single record of a log logged by a Logger object and handled by a LogWriter object.
LogFile LogFile provides great convenience for logging information from a program into a file.
Logger Logger somewhat leans on the functionality of the java.util.logging functionality of J2SE 1.4, but it's not quite the same (and was implemented before J2SE 1.4).
SocketLogListener used to listen to LogEntry objects send through a NetConnection.
SocketWriter simply used to write serialized LogEntry objects via network
StackTraceFileWriter writes full stack trace of entries that log an exception to a given file.
StringBufferLog StringBufferLog writes log messages into a StringBuffer.
StringLineFormatter formats a LogEntry into a simple one-line String terminated by a line break.
XMLLogFormatter formats LogEntry objects as XML.
XMLWriter writes LogEntry objects formatted as XML to either a PrintStream or PrintWriter.

Exception Summary
LogException LogException is thrown when a problem is encountered while writing to a LogWriter

Package org.jscience.util.logging Description

This package contains classes that implement a custom logging for this framework - separate from java.util.logging.

This package is meant to be deprecated in favor of classes existing in other packages. Please don't use the classes from this package.

The classes in this package have been implemented prior to J2SE 1.4 when java.util.logging became available. However, they have been slightly changed since then and were finally put in this package (as they were in com.antelmann.util before), so that they are kept separate.

One difference between this com.antelmann.util.logging and java.util.logging is that this logging here can be synchronous, i.e. the log entry may be flushed to its destination every time before any of the logging methods return - done at the discretion of any given LogWriter object. Also, exceptions that may occur can be propagated into the thread that called the log method (alternatively, this can be handled by setting up a separate exception handler). In addition, the log entry here can include a full stack trace of the occurrence. Finally, this logging facility is somewhat simpler (naturally, as it is not as complex).

There are of course many more differences, but the above is the main thing.