Home » apache-log4j-1.2.16 » org.apache » log4j »

org.apache.log4j

Sub Packages:

org.apache.log4j.chainsaw   Chainsaw is a GUI log viewer and filter for the log4j package.  
org.apache.log4j.config   Package used in getting/setting component properties.  
org.apache.log4j.gui    
org.apache.log4j.gui.examples    
org.apache.log4j.helpers    
org.apache.log4j.jdbc   The JDBCAppender provides for sending log events to a database.  
org.apache.log4j.jmx   This package lets you manage log4j settings using JMX.  
org.apache.log4j.lf5    
org.apache.log4j.lf5.util    
org.apache.log4j.lf5.viewer   This version of LogFactor5 is not completely integrated with log4j.  
org.apache.log4j.lf5.viewer.categoryexplorer    
org.apache.log4j.lf5.viewer.configure    
org.apache.log4j.net    
org.apache.log4j.net.test   Package for remote logging.  
org.apache.log4j.nt   Package for NT event logging.  
org.apache.log4j.nt.test   Package for NT event logging.  
org.apache.log4j.or   ObjectRenders are resposible for rendering messages depending on their class type.  
org.apache.log4j.or.jms   This package contains the MessageRenderer which renders objects of type javax.jms.Message .  
org.apache.log4j.or.sax   This package contains the AttributesRenderer which renders object of class org.xml.sax.Attributes .  
org.apache.log4j.pattern   Provides classes implementing format specifiers in conversion patterns.  
org.apache.log4j.performance   Package to measure the performance of the different log4j components.  
org.apache.log4j.spi   Contains part of the System Programming Interface (SPI) needed to extend log4j.  
org.apache.log4j.varia   Contains various appenders, filters and other odds and ends.  
org.apache.log4j.varia.test   Contains various appenders, filters and other odds and ends.  
org.apache.log4j.xml   The main log4j package.  
org.apache.log4j.xml.examples    
org.apache.log4j.xml.test   XML based components.  

Interfaces:

Appender   Implement this interface for your own strategies for outputting log statements.  code | html

Abstract Classes:

AppenderSkeleton   Abstract superclass of the other appenders in the package.  code | html
Layout   Extend this abstract class to create your own log layout format.  code | html
LogXF   This is a base class for LogMF and LogSF parameterized logging classes.  code | html

Classes:

AsyncAppender   The AsyncAppender lets users log events asynchronously.  code | html
AsyncAppender.DiscardSummary   Summary of discarded logging events for a logger.  code | html
AsyncAppender.Dispatcher   Event dispatcher.  code | html
BasicConfigurator   Use this class to quickly configure the package.  code | html
Category   This class has been deprecated and replaced by the Logger subclass code | html
CategoryKey   CategoryKey is a wrapper for String that apparently accellerated hash table lookup in early JVM's.  code | html
CompositeRollingAppender  

CompositeRollingAppender combines RollingFileAppender and DailyRollingFileAppender
It can function as either or do both at the same time (making size based rolling files like RollingFileAppender until a data/time boundary is crossed at which time it rolls all of those files as per the DailyRollingFileAppender) based on the setting for rollingStyle.

To use CompositeRollingAppender to roll log files as they reach a certain size (like RollingFileAppender), set rollingStyle=1 (@see config.size)
To use CompositeRollingAppender to roll log files at certain time intervals (daily for example), set rollingStyle=2 and a datePattern (@see config.time)
To have CompositeRollingAppender roll log files at a certain size AND rename those according to time intervals, set rollingStyle=3 (@see config.composite)

A of few additional optional features have been added:
-- Attach date pattern for current log file (@see staticLogFileName)
-- Backup number increments for newer files (@see countDirection)
-- Infinite number of backups by file size (@see maxSizeRollBackups)

A few notes and warnings: For large or infinite number of backups countDirection > 0 is highly recommended, with staticLogFileName = false if time based rolling is also used -- this will reduce the number of file renamings to few or none. 

code | html
ConsoleAppender   ConsoleAppender appends log events to System.out or System.err using a layout specified by the user.  code | html
ConsoleAppender.SystemErrStream   An implementation of OutputStream that redirects to the current System.err.  code | html
ConsoleAppender.SystemOutStream   An implementation of OutputStream that redirects to the current System.out.  code | html
DailyFileAppender   DailyFileAppender extends FileAppender to use filenames formatted with date/time information.  code | html
DailyFileAppenderCalendar   DailyFileAppenderCalendar is a helper class to DailyFileAppender.  code | html
DailyRollingFileAppender   DailyRollingFileAppender extends FileAppender so that the underlying file is rolled over at a user chosen frequency.  code | html
DefaultCategoryFactory     code | html
DefaultThrowableRenderer   Default implementation of ThrowableRenderer using Throwable.printStackTrace.  code | html
Dispatcher   Obsolete AsyncAppender dispatcher provided for compatibility only.  code | html
EnhancedPatternLayout   This class is an enhanced version of org.apache.log4j.PatternLayout which was originally developed as part of the abandoned log4j 1.3 effort and has been available in the extras companion.  code | html
EnhancedThrowableRenderer   Enhanced implementation of ThrowableRenderer.  code | html
FileAppender   FileAppender appends log events to a file.  code | html
HTMLLayout   This layout outputs events in a HTML table.  code | html
Hierarchy   This class is specialized in retrieving loggers by name and also maintaining the logger hierarchy.  code | html
Level   Defines the minimum set of levels recognized by the system, that is OFF, FATAL, ERROR, WARN, INFODEBUG and ALL code | html
Log4jLoggerFactory   This class is a factory that creates and maintains org.apache.log4j.Loggers warpping org.slf4j.Loggers.  code | html
LogMF   This class provides parameterized logging services using the pattern syntax of java.text.MessageFormat.  code | html
LogManager   Use the LogManager class to retreive Logger instances or to operate on the current LoggerRepository code | html
LogSF   This class provides parameterized logging services using the SLF4J pattern syntax.  code | html
Logger   This is the central class in the log4j package.  code | html
MDC   The MDC class is similar to the NDC class except that it is based on a map instead of a stack.  code | html
NDC   The NDC class implements nested diagnostic contexts as defined by Neil Harrison in the article "Patterns for Logging Diagnostic Messages" part of the book "Pattern Languages of Program Design 3" edited by Martin et al.  code | html
NDC.DiagnosticContext     code | html
NameValue     code | html
PatternLayout   A flexible layout configurable with pattern string.  code | html
Priority   Refrain from using this class directly, use the Level class instead code | html
PropertyConfigurator   Allows the configuration of log4j from an external file.  code | html
PropertyWatchdog     code | html
ProvisionNode     code | html
RollingCalendar   RollingCalendar is a helper class to DailyRollingFileAppender.  code | html
RollingFileAppender   RollingFileAppender extends FileAppender to backup the log files when they reach a certain size.  code | html
SimpleLayout   SimpleLayout consists of the level of the log statement, followed by " - " and then the log message itself.  code | html
SortedKeyEnumeration     code | html
TTCCLayout   TTCC layout format consists of time, thread, category and nested diagnostic context information, hence the name.  code | html
TempFileAppender   TempFileAppender creates new unique file for each logging statement.  code | html
WriterAppender   WriterAppender appends log events to a java.io.Writer or an java.io.OutputStream depending on the user's choice.  code | html