Logging Utilities
com.srbenoit.log
This package extends the Java logging facilities provided under java.util.logging
with a custom formatter that presents a much more compact format for log messages, and provides new base classes for Object, Thread and JPanel that have a static Logger named LOG
defined and configured with this formatter. By extending one of these classes, logging can be performed by invoking, for example, LOG.info("hello world");
.
- LogFormatter
- A formatter to create a compact and well-aligned text output for log records.
- LoggedObject
- An object that includes a static logger to which diagnostic messages can be logged.
- LoggedPanel
- A panel that includes a static logger to which diagnostic messages can be logged.
- LoggedThread
- A thread that includes a static logger to which diagnostic messages can be logged.
- LogHandler
- A custom log entry handler that writes log records to a series of files and also has the ability
to retain log entries for a period of time, and provide access to the retained entries.
- LogMgr
- A class with a static method to create a named
Logger
that has a special handler
installed to allow retention of and access to log records.
- LogProperties
- Properties used by the logging classes.
- LogRes
- Resources used by the logging classes for localization.
- MessageInt
- Interface implemented by messages.
- MessageList
- A list of messages generated by some process that spans classes. Messages are intended for users,
not for system diagnostic.
- ParseError
- A message that indicates an error in parsing. It includes the range in the source data where the
parse error occurred.
- SysOutConsoleHandler
- A handler to direct output to
System.out
.
- Example Log.properties file
- An example of the configuration options.
As the author of the source code available by following the links above, I hereby place this source code in the public domain. You can use, modify, and distribute the source code and executable programs based on the source code. However, note the following:
DISCLAIMER OF WARRANTY
This source code is provided "as is" and without any express or implied warranties whatsoever. The user must assume the entire risk of using the source code.