Package net.directj.jlogger

JLogger is a simple tools that allow powerfull easy logging.

See:
          Description

Interface Summary
Configurator This is the default interface to configure JLogger.
Formatter This is a simple common interface for the jlogger tools that specify how data is written.
Output This is a simple common interface for the jlogger tools that specify where data is written.
 

Class Summary
ConsoleLogManager This class is a console log manager, with special output and formatter for the console.
ConsoleOutput This is a simple class that just print logging output onto the console (System.out).
DefaultFormatter This is the default formatter, used to format the logging information.
FileLogManager This class is a file log manager, it use a default formatter and a file output.
FileOutput This is a simple class that print logging information into a file.
HtmlFormatter This is the html formatter, used to format the logging information.
HtmlLogManager This class is a html log manager, with special output and formatter for creating an Html file.
JDBCLogManager This class is a DB log manager, with special output and formatter for connecting to a DB.
JDBCOutput This is a simple class that print logging information into a specified DataBase.
JLogger This class is the logging tool class.
JLoggerFactory This class can create a JLogger, and return it.
JTableLogManager This is a log manager that stored logging information onto a JPanel, using a tabular component.
JTableOutput This class is used to print the logging information into a GUI element, using a tabular component.
JTextLogManager This is a log manager that stored logging information onto a JPanel, using a textual component.
JTextOutput This class is used to print the logging information into a GUI element, using a textual component.
LogManager This class is a manager for the logging output.
LogRecord A very simple class that store logging information.
NetworkLogManager  
NetworkOutput  
PatternFormatter This is a pattern formatter, that allow you to create you're own format.
StreamOutput This is a simple class that print logging information into a stream.
XmlConfigurator This class is used to configure JLogger from an XML file, using DOM.
XmlFormatter This is the xml formatter, used to format the logging information.
XmlLogManager This class is a xml log manager, with special output and formatter for creating an xml file.
 

Package net.directj.jlogger Description

JLogger is a simple tools that allow powerfull easy logging.

It allow the user to log any informations, with different importance level, to format this informations as he want and to print or store them where he want.

You have to specify a log manager, that is the association of an output and a formatter. There is some Console log manager, Html or Xml one, but you also can easely create you'r one. Each manager have his own level, meaning that some information will be print onto a manager and not one an other.

If you select DEBUG, then INFO, WARNING, ERROR and FATAL information will also be print. If you select WARNING, EXCEPTION, ERROR and FATAL will be print, but DEBUG and INFO information will not.
There is 6 level: ALL < DEBUG < INFO < WARNING < ERROR < FATAL < OFF, plus EXCEPTION, that will be printed with any level except OFF

You also can specify a special format, using a class that implements net.jlogger.Formatter. Using or extending this interface is really simple, and a few format are provided with the package. And it is the same thing for the output: easy to use, easy to extend!!

Using JLogger is very simple:

  • First create your JLogger object:
    JLogger logger = new JLogger();
  • Add one or more LogManager, specifying the logging level:
    logger.addLogManager(new ConsoleLogManager(JLogger.ALL));
    You also can provide your own LogManager:
    log.addLogManager(new LogManager(JLogger.ERROR, new SimpleFormatter(), new FileOutput()));
  • Now, print the information you want:
    logger.debug("Hello World");
    logger.info("Hello World");
    logger.warning("Hello World");
    logger.error("Hello World");
    logger.fatal("Hello World");
    logger.exception("Hello World");
  • This is REALLY simple!!



    Copyright © 2002 CARTAPANIS Alexandre
    This page was last updated on May 10 2003