+ All Categories
Home > Documents > About Jd2chm The project files of this HTML Help Were … · log4j version 1.2.14 API Specification...

About Jd2chm The project files of this HTML Help Were … · log4j version 1.2.14 API Specification...

Date post: 26-May-2020
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
1293
About Jd2chm... The project files of this HTML Help Were generated with Jd2chm version 0.3 Copyright © 2000-2003 Andre Burgaud http://www.burgaud.com
Transcript
  • AboutJd2chm...TheprojectfilesofthisHTMLHelp

    WeregeneratedwithJd2chmversion0.3Copyright©2000-2003AndreBurgaud

    http://www.burgaud.com

    mailto:[email protected]://www.burgaud.com/

  • Overview Package Class Use Tree Deprecated IndexHelp Log4j1.2.14PREVNEXT FRAMESNOFRAMES

  • log4jversion1.2.14APISpecification

    Makesuretoreadtheusermanualinadditiontothisjavadocdocumentation.

    See:Description

    Packagesorg.apache.log4j Themainlog4jpackage.

    org.apache.log4j.chainsaw ChainsawisaGUIlogviewerandfilterforthelog4jpackage.

    org.apache.log4j.config Packageusedingetting/settingcomponentproperties.org.apache.log4j.helpers Thispackageisusedinternally.

    org.apache.log4j.jdbc TheJDBCAppenderprovidesforsendinglogeventstoadatabase.

    org.apache.log4j.jmx Thispackageletsyoumanagelog4jsettingsusingJMX.org.apache.log4j.lf5 org.apache.log4j.net Packageforremotelogging.org.apache.log4j.nt PackageforNTeventlogging.

    org.apache.log4j.orObjectRendersareresposibleforrenderingmessagesdependingontheirclasstype.

    org.apache.log4j.or.jmsThispackagecontainstheMessageRendererwhichrendersobjectsoftypejavax.jms.Message.

    org.apache.log4j.or.saxThispackagecontainstheAttributesRendererwhichrendersobjectofclassorg.xml.sax.Attributes.

  • org.apache.log4j.performance Packagetomeasuretheperformanceofthedifferentlog4jcomponents.

    org.apache.log4j.spiContainspartoftheSystemProgrammingInterface(SPI)neededtoextendlog4j.

    org.apache.log4j.varia Containsvariousappenders,filtersandotheroddsandends.org.apache.log4j.xml XMLbasedcomponents.

    org.apache.log4j.xml.examples Exampleusageoflog4jwithXML(includingsourcecode).

    Makesuretoreadtheusermanualinadditiontothisjavadocdocumentation.

    Overview Package Class Use Tree Deprecated IndexHelp Log4j1.2.14PREVNEXT FRAMESNOFRAMES

    Copyright2000-2005ApacheSoftwareFoundation.

  • Overview Package Class Use Tree Deprecated IndexHelp Log4j1.2.14PREVNEXT FRAMESNOFRAMES

  • HierarchyForAllPackagesPackageHierarchies:

    org.apache.log4j,org.apache.log4j.chainsaw,org.apache.log4j.config,org.apache.log4j.helpers,org.apache.log4j.jdbc,org.apache.log4j.jmx,org.apache.log4j.lf5,org.apache.log4j.net,org.apache.log4j.nt,org.apache.log4j.or,org.apache.log4j.or.jms,org.apache.log4j.or.sax,org.apache.log4j.performance,org.apache.log4j.spi,org.apache.log4j.varia,org.apache.log4j.xml,org.apache.log4j.xml.examples

  • ClassHierarchyclassjava.lang.Object

    classorg.apache.log4j.jmx.AbstractDynamicMBean(implementsjavax.management.DynamicMBean,javax.management.MBeanRegistration)

    classorg.apache.log4j.jmx.AppenderDynamicMBeanclassorg.apache.log4j.jmx.HierarchyDynamicMBean(implementsorg.apache.log4j.spi.HierarchyEventListener,javax.management.NotificationBroadcaster)classorg.apache.log4j.jmx.LayoutDynamicMBeanclassorg.apache.log4j.jmx.LoggerDynamicMBean(implementsjavax.management.NotificationListener)

    classorg.apache.log4j.jmx.Agentclassorg.apache.log4j.helpers.AppenderAttachableImpl(implementsorg.apache.log4j.spi.AppenderAttachable)classorg.apache.log4j.lf5.AppenderFinalizerclassorg.apache.log4j.AppenderSkeleton(implementsorg.apache.log4j.Appender,org.apache.log4j.spi.OptionHandler)

    classorg.apache.log4j.AsyncAppender(implementsorg.apache.log4j.spi.AppenderAttachable)classorg.apache.log4j.jdbc.JDBCAppender(implementsorg.apache.log4j.Appender)classorg.apache.log4j.net.JMSAppenderclassorg.apache.log4j.lf5.LF5Appenderclassorg.apache.log4j.nt.NTEventLogAppenderclassorg.apache.log4j.performance.NullAppenderclassorg.apache.log4j.varia.NullAppenderclassorg.apache.log4j.net.SMTPAppenderclassorg.apache.log4j.net.SocketAppenderclassorg.apache.log4j.net.SocketHubAppenderclassorg.apache.log4j.net.SyslogAppenderclassorg.apache.log4j.net.TelnetAppenderclassorg.apache.log4j.WriterAppender

    classorg.apache.log4j.ConsoleAppenderclassorg.apache.log4j.FileAppender

    http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html

  • classorg.apache.log4j.DailyRollingFileAppenderclassorg.apache.log4j.RollingFileAppender

    classorg.apache.log4j.varia.ExternallyRolledFileAppender

    classorg.apache.log4j.or.sax.AttributesRenderer(implementsorg.apache.log4j.or.ObjectRenderer)classorg.apache.log4j.BasicConfiguratorclassorg.apache.log4j.helpers.BoundedFIFOclassorg.apache.log4j.Category(implementsorg.apache.log4j.spi.AppenderAttachable)

    classorg.apache.log4j.Loggerclassorg.apache.log4j.spi.RootCategoryclassorg.apache.log4j.spi.RootLogger

    classjava.awt.Component(implementsjava.awt.image.ImageObserver,java.awt.MenuContainer,java.io.Serializable)

    classjava.awt.Containerclassjava.awt.Window(implementsjavax.accessibility.Accessible)

    classjava.awt.Frame(implementsjava.awt.MenuContainer)

    classjavax.swing.JFrame(implementsjavax.accessibility.Accessible,javax.swing.RootPaneContainer,javax.swing.WindowConstants)

    classorg.apache.log4j.chainsaw.Mainclassorg.apache.log4j.helpers.CyclicBufferclassorg.apache.log4j.lf5.DefaultLF5Configurator(implementsorg.apache.log4j.spi.Configurator)classorg.apache.log4j.spi.DefaultRepositorySelector(implementsorg.apache.log4j.spi.RepositorySelector)classorg.apache.log4j.xml.DOMConfigurator(implementsorg.apache.log4j.spi.Configurator)classorg.apache.log4j.varia.FallbackErrorHandler(implementsorg.apache.log4j.spi.ErrorHandler)classorg.apache.log4j.spi.Filter(implementsorg.apache.log4j.spi.OptionHandler)

    classorg.apache.log4j.varia.DenyAllFilterclassorg.apache.log4j.varia.LevelMatchFilter

    http://java.sun.com/j2se/1.3/docs/api/java/awt/Component.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/awt/image/ImageObserver.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/awt/MenuContainer.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/io/Serializable.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/awt/Container.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/awt/Window.htmlhttp://java.sun.com/j2se/1.3/docs/api/javax/accessibility/Accessible.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/awt/Frame.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/awt/MenuContainer.htmlhttp://java.sun.com/j2se/1.3/docs/api/javax/swing/JFrame.htmlhttp://java.sun.com/j2se/1.3/docs/api/javax/accessibility/Accessible.htmlhttp://java.sun.com/j2se/1.3/docs/api/javax/swing/RootPaneContainer.htmlhttp://java.sun.com/j2se/1.3/docs/api/javax/swing/WindowConstants.html

  • classorg.apache.log4j.varia.LevelRangeFilterclassorg.apache.log4j.varia.StringMatchFilter

    classjava.text.Format(implementsjava.lang.Cloneable,java.io.Serializable)

    classjava.text.DateFormatclassorg.apache.log4j.helpers.AbsoluteTimeDateFormat

    classorg.apache.log4j.helpers.DateTimeDateFormatclassorg.apache.log4j.helpers.ISO8601DateFormat

    classorg.apache.log4j.helpers.RelativeTimeDateFormat

    classorg.apache.log4j.helpers.FormattingInfoclassorg.apache.log4j.Hierarchy(implementsorg.apache.log4j.spi.LoggerRepository,org.apache.log4j.spi.RendererSupport)classorg.apache.log4j.net.JMSSink(implementsjavax.jms.MessageListener)classorg.apache.log4j.Layout(implementsorg.apache.log4j.spi.OptionHandler)

    classorg.apache.log4j.helpers.DateLayoutclassorg.apache.log4j.TTCCLayout

    classorg.apache.log4j.HTMLLayoutclassorg.apache.log4j.PatternLayoutclassorg.apache.log4j.SimpleLayoutclassorg.apache.log4j.xml.XMLLayout

    classorg.apache.log4j.performance.ListVsVectorclassorg.apache.log4j.helpers.Loaderclassorg.apache.log4j.spi.LocationInfo(implementsjava.io.Serializable)classorg.apache.log4j.xml.Log4jEntityResolver(implementsorg.xml.sax.EntityResolver)classorg.apache.log4j.spi.LoggingEvent(implementsjava.io.Serializable)classorg.apache.log4j.lf5.LogLevel(implementsjava.io.Serializable)classorg.apache.log4j.helpers.LogLogclassorg.apache.log4j.LogManager

    http://java.sun.com/j2se/1.3/docs/api/java/text/Format.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Cloneable.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/io/Serializable.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/text/DateFormat.htmlhttp://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/jms/MessageListener.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/io/Serializable.htmlhttp://java.sun.com/j2ee/sdk_1.3/techdocs/api/org/xml/sax/EntityResolver.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/io/Serializable.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/io/Serializable.html

  • classorg.apache.log4j.lf5.LogRecord(implementsjava.io.Serializable)

    classorg.apache.log4j.lf5.Log4JLogRecordclassorg.apache.log4j.MDCclassorg.apache.log4j.or.jms.MessageRenderer(implementsorg.apache.log4j.or.ObjectRenderer)classorg.apache.log4j.NDCclassorg.apache.log4j.performance.NewVsSetLenclassorg.apache.log4j.helpers.NullEnumeration(implementsjava.util.Enumeration)classorg.apache.log4j.helpers.OnlyOnceErrorHandler(implementsorg.apache.log4j.spi.ErrorHandler)classorg.apache.log4j.helpers.OptionConverterclassorg.apache.log4j.lf5.PassingLogRecordFilter(implementsorg.apache.log4j.lf5.LogRecordFilter)classorg.apache.log4j.helpers.PatternConverterclassorg.apache.log4j.helpers.PatternParserclassorg.apache.log4j.Priority

    classorg.apache.log4j.Level(implementsjava.io.Serializable)

    classorg.apache.log4j.PropertyConfigurator(implementsorg.apache.log4j.spi.Configurator)classorg.apache.log4j.config.PropertyGetterclassorg.apache.log4j.config.PropertyPrinter(implementsorg.apache.log4j.config.PropertyGetter.PropertyCallback)classorg.apache.log4j.config.PropertySetterclassorg.apache.log4j.varia.ReloadingPropertyConfigurator(implementsorg.apache.log4j.spi.Configurator)classorg.apache.log4j.or.RendererMapclassorg.apache.log4j.xml.examples.ReportParserError(implementsorg.xml.sax.ErrorHandler)classorg.apache.log4j.varia.Rollerclassorg.apache.log4j.xml.SAXErrorHandler(implementsorg.xml.sax.ErrorHandler)classorg.apache.log4j.net.SimpleSocketServerclassorg.apache.log4j.net.SocketNode(implementsjava.lang.Runnable)classorg.apache.log4j.net.SocketServerclassorg.apache.log4j.lf5.StartLogFactor5

    http://java.sun.com/j2se/1.3/docs/api/java/io/Serializable.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/util/Enumeration.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/io/Serializable.htmlhttp://java.sun.com/j2ee/sdk_1.3/techdocs/api/org/xml/sax/ErrorHandler.htmlhttp://java.sun.com/j2ee/sdk_1.3/techdocs/api/org/xml/sax/ErrorHandler.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Runnable.html

  • classorg.apache.log4j.performance.SystemTimeclassjava.lang.Thread(implementsjava.lang.Runnable)

    classorg.apache.log4j.helpers.FileWatchdogclassorg.apache.log4j.net.TelnetAppender.SocketHandler

    classorg.apache.log4j.or.ThreadGroupRenderer(implementsorg.apache.log4j.or.ObjectRenderer)classjava.lang.ThreadLocal

    classjava.lang.InheritableThreadLocalclassorg.apache.log4j.helpers.ThreadLocalMap

    classjava.lang.Throwable(implementsjava.io.Serializable)classjava.lang.Exception

    classorg.apache.log4j.lf5.LogLevelFormatExceptionclassorg.apache.log4j.config.PropertySetterException

    classorg.apache.log4j.spi.ThrowableInformation(implementsjava.io.Serializable)classorg.apache.log4j.helpers.Transformclassjava.io.Writer

    classjava.io.FilterWriterclassorg.apache.log4j.helpers.QuietWriter

    classorg.apache.log4j.helpers.CountingQuietWriterclassorg.apache.log4j.helpers.SyslogQuietWriter

    classorg.apache.log4j.performance.NOPWriterclassorg.apache.log4j.helpers.SyslogWriter

    classorg.apache.log4j.xml.examples.XMLSample

    http://java.sun.com/j2se/1.3/docs/api/java/lang/Thread.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Runnable.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/ThreadLocal.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/InheritableThreadLocal.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/io/Serializable.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Exception.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/io/Serializable.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/io/Writer.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/io/FilterWriter.html

  • InterfaceHierarchyinterfaceorg.apache.log4j.Appenderinterfaceorg.apache.log4j.spi.AppenderAttachableinterfaceorg.apache.log4j.spi.Configuratorinterfaceorg.apache.log4j.spi.ErrorCodeinterfaceorg.apache.log4j.spi.HierarchyEventListenerinterfaceorg.apache.log4j.spi.LoggerFactoryinterfaceorg.apache.log4j.spi.LoggerRepositoryinterfaceorg.apache.log4j.lf5.LogRecordFilterinterfaceorg.apache.log4j.or.ObjectRendererinterfaceorg.apache.log4j.spi.OptionHandler

    interfaceorg.apache.log4j.spi.ErrorHandlerinterfaceorg.apache.log4j.config.PropertyGetter.PropertyCallbackinterfaceorg.apache.log4j.spi.RendererSupportinterfaceorg.apache.log4j.spi.RepositorySelectorinterfaceorg.apache.log4j.spi.TriggeringEventEvaluator

    Overview Package Class Use Tree Deprecated IndexHelp Log4j1.2.14PREVNEXT FRAMESNOFRAMES

    Copyright2000-2005ApacheSoftwareFoundation.

  • Overview Package Class Use Tree Deprecated IndexHelp Log4j1.2.14PREVPACKAGENEXTPACKAGE FRAMESNOFRAMES

  • Packageorg.apache.log4jThemainlog4jpackage.

    See:Description

    InterfaceSummaryAppender Implementthisinterfaceforyourownstrategiesforoutputtinglogstatements.

    ClassSummaryAppenderSkeleton Abstractsuperclassoftheotherappendersinthepackage.

    AsyncAppender TheAsyncAppenderletsuserslogeventsasynchronously.

    BasicConfigurator Usethisclasstoquicklyconfigurethepackage.

    Category ThisclasshasbeendeprecatedandreplacedbytheLoggersubclass.

    ConsoleAppenderConsoleAppenderappendslogeventstoSystem.outorSystem.errusingalayoutspecifiedbytheuser.

    DailyRollingFileAppenderDailyRollingFileAppenderextendsFileAppendersothattheunderlyingfileisrolledoveratauserchosenfrequency.

    FileAppender FileAppenderappendslogeventstoafile.

    HierarchyThisclassisspecializedinretrievingloggersbynameandalsomaintainingtheloggerhierarchy.

    HTMLLayout ThislayoutoutputseventsinaHTMLtable.Layout Extendthisabstractclasstocreateyour

    ownloglayoutformat.

  • LevelDefinestheminimumsetoflevelsrecognizedbythesystem,thatisOFF,FATAL,ERROR,WARN,INFODEBUGandALL.

    Logger Thisisthecentralclassinthelog4jpackage.

    LogManagerUsetheLogManagerclasstoretreiveLoggerinstancesortooperateonthecurrentLoggerRepository.

    MDCTheMDCclassissimilartotheNDCclassexceptthatitisbasedonamapinsteadofastack.

    NDC

    TheNDCclassimplementsnesteddiagnosticcontextsasdefinedbyNeilHarrisoninthearticle"PatternsforLoggingDiagnosticMessages"partofthebook"PatternLanguagesofProgramDesign3"editedbyMartinetal.

    PatternLayout Aflexiblelayoutconfigurablewithpatternstring.

    Priority Refrainfromusingthisclassdirectly,usetheLevelclassinstead.

    PropertyConfigurator Allowstheconfigurationoflog4jfromanexternalfile.

    RollingFileAppenderRollingFileAppenderextendsFileAppendertobackupthelogfileswhentheyreachacertainsize.

    SimpleLayoutSimpleLayoutconsistsofthelevelofthelogstatement,followedby"-"andthenthelogmessageitself.

    TTCCLayoutTTCClayoutformatconsistsoftime,thread,categoryandnesteddiagnosticcontextinformation,hencethename.

    WriterAppenderWriterAppenderappendslogeventstoaWriteroranOutputStreamdependingontheuser'schoice.

    http://java.sun.com/j2se/1.3/docs/api/java/io/Writer.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/io/OutputStream.html

  • Packageorg.apache.log4jDescriptionThemainlog4jpackage.

    Overview Package Class Use Tree Deprecated IndexHelp Log4j1.2.14PREVPACKAGENEXTPACKAGE FRAMESNOFRAMES

    Copyright2000-2005ApacheSoftwareFoundation.

  • Overview Package Class Use Tree Deprecated IndexHelp Log4j1.2.14PREVNEXT FRAMESNOFRAMES

  • HierarchyForPackageorg.apache.log4jPackageHierarchies:

    AllPackages

  • ClassHierarchyclassjava.lang.Object

    classorg.apache.log4j.AppenderSkeleton(implementsorg.apache.log4j.Appender,org.apache.log4j.spi.OptionHandler)

    classorg.apache.log4j.AsyncAppender(implementsorg.apache.log4j.spi.AppenderAttachable)classorg.apache.log4j.WriterAppender

    classorg.apache.log4j.ConsoleAppenderclassorg.apache.log4j.FileAppender

    classorg.apache.log4j.DailyRollingFileAppenderclassorg.apache.log4j.RollingFileAppender

    classorg.apache.log4j.BasicConfiguratorclassorg.apache.log4j.Category(implementsorg.apache.log4j.spi.AppenderAttachable)

    classorg.apache.log4j.Loggerclassorg.apache.log4j.Hierarchy(implementsorg.apache.log4j.spi.LoggerRepository,org.apache.log4j.spi.RendererSupport)classorg.apache.log4j.Layout(implementsorg.apache.log4j.spi.OptionHandler)

    classorg.apache.log4j.helpers.DateLayoutclassorg.apache.log4j.TTCCLayout

    classorg.apache.log4j.HTMLLayoutclassorg.apache.log4j.PatternLayoutclassorg.apache.log4j.SimpleLayout

    classorg.apache.log4j.LogManagerclassorg.apache.log4j.MDCclassorg.apache.log4j.NDCclassorg.apache.log4j.Priority

    classorg.apache.log4j.Level(implementsjava.io.Serializable)

    classorg.apache.log4j.PropertyConfigurator(implementsorg.apache.log4j.spi.Configurator)

    http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/io/Serializable.html

  • InterfaceHierarchyinterfaceorg.apache.log4j.Appender

    Overview Package Class Use Tree Deprecated IndexHelp Log4j1.2.14PREVNEXT FRAMESNOFRAMES

    Copyright2000-2005ApacheSoftwareFoundation.

  • Overview Package Class Use Tree Deprecated IndexHelp Log4j1.2.14PREVNEXT FRAMESNOFRAMES

  • UsesofPackageorg.apache.log4j

    Packagesthatuseorg.apache.log4jorg.apache.log4j Themainlog4jpackage.

    org.apache.log4j.config Packageusedingetting/settingcomponentproperties.org.apache.log4j.helpers Thispackageisusedinternally.

    org.apache.log4j.jdbc TheJDBCAppenderprovidesforsendinglogeventstoadatabase.

    org.apache.log4j.jmx Thispackageletsyoumanagelog4jsettingsusingJMX.org.apache.log4j.lf5 org.apache.log4j.net Packageforremotelogging.org.apache.log4j.nt PackageforNTeventlogging.

    org.apache.log4j.performance Packagetomeasuretheperformanceofthedifferentlog4jcomponents.

    org.apache.log4j.spiContainspartoftheSystemProgrammingInterface(SPI)neededtoextendlog4j.

    org.apache.log4j.varia Containsvariousappenders,filtersandotheroddsandends.org.apache.log4j.xml XMLbasedcomponents.

    Classesinorg.apache.log4jusedbyorg.apache.log4jAppenderImplementthisinterfaceforyourownstrategiesforoutputtinglogstatements.

  • AppenderSkeletonAbstractsuperclassoftheotherappendersinthepackage.CategoryThisclasshasbeendeprecatedandreplacedbytheLoggersubclass.FileAppenderFileAppenderappendslogeventstoafile.LayoutExtendthisabstractclasstocreateyourownloglayoutformat.LevelDefinestheminimumsetoflevelsrecognizedbythesystem,thatisOFF,FATAL,ERROR,WARN,INFODEBUGandALL.LoggerThisisthecentralclassinthelog4jpackage.PriorityRefrainfromusingthisclassdirectly,usetheLevelclassinstead.WriterAppenderWriterAppenderappendslogeventstoaWriteroranOutputStreamdependingontheuser'schoice.

    Classesinorg.apache.log4jusedbyorg.apache.log4j.configLoggerThisisthecentralclassinthelog4jpackage.

    Classesinorg.apache.log4jusedbyorg.apache.log4j.helpersAppenderImplementthisinterfaceforyourownstrategiesforoutputtinglogstatements.Layout

    http://java.sun.com/j2se/1.3/docs/api/java/io/Writer.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/io/OutputStream.html

  • Extendthisabstractclasstocreateyourownloglayoutformat.LevelDefinestheminimumsetoflevelsrecognizedbythesystem,thatisOFF,FATAL,ERROR,WARN,INFODEBUGandALL.LoggerThisisthecentralclassinthelog4jpackage.

    Classesinorg.apache.log4jusedbyorg.apache.log4j.jdbcAppenderImplementthisinterfaceforyourownstrategiesforoutputtinglogstatements.AppenderSkeletonAbstractsuperclassoftheotherappendersinthepackage.

    Classesinorg.apache.log4jusedbyorg.apache.log4j.jmxAppenderImplementthisinterfaceforyourownstrategiesforoutputtinglogstatements.CategoryThisclasshasbeendeprecatedandreplacedbytheLoggersubclass.LayoutExtendthisabstractclasstocreateyourownloglayoutformat.LoggerThisisthecentralclassinthelog4jpackage.

    Classesinorg.apache.log4jusedby

  • org.apache.log4j.lf5AppenderImplementthisinterfaceforyourownstrategiesforoutputtinglogstatements.AppenderSkeletonAbstractsuperclassoftheotherappendersinthepackage.

    Classesinorg.apache.log4jusedbyorg.apache.log4j.netAppenderImplementthisinterfaceforyourownstrategiesforoutputtinglogstatements.AppenderSkeletonAbstractsuperclassoftheotherappendersinthepackage.LayoutExtendthisabstractclasstocreateyourownloglayoutformat.

    Classesinorg.apache.log4jusedbyorg.apache.log4j.ntAppenderImplementthisinterfaceforyourownstrategiesforoutputtinglogstatements.AppenderSkeletonAbstractsuperclassoftheotherappendersinthepackage.LayoutExtendthisabstractclasstocreateyourownloglayoutformat.

    Classesinorg.apache.log4jusedby

  • org.apache.log4j.performanceAppenderImplementthisinterfaceforyourownstrategiesforoutputtinglogstatements.AppenderSkeletonAbstractsuperclassoftheotherappendersinthepackage.LayoutExtendthisabstractclasstocreateyourownloglayoutformat.

    Classesinorg.apache.log4jusedbyorg.apache.log4j.spiAppenderImplementthisinterfaceforyourownstrategiesforoutputtinglogstatements.CategoryThisclasshasbeendeprecatedandreplacedbytheLoggersubclass.LevelDefinestheminimumsetoflevelsrecognizedbythesystem,thatisOFF,FATAL,ERROR,WARN,INFODEBUGandALL.LoggerThisisthecentralclassinthelog4jpackage.PriorityRefrainfromusingthisclassdirectly,usetheLevelclassinstead.

    Classesinorg.apache.log4jusedbyorg.apache.log4j.variaAppenderImplementthisinterfaceforyourownstrategiesforoutputtinglogstatements.

  • AppenderSkeletonAbstractsuperclassoftheotherappendersinthepackage.FileAppenderFileAppenderappendslogeventstoafile.LevelDefinestheminimumsetoflevelsrecognizedbythesystem,thatisOFF,FATAL,ERROR,WARN,INFODEBUGandALL.LoggerThisisthecentralclassinthelog4jpackage.RollingFileAppenderRollingFileAppenderextendsFileAppendertobackupthelogfileswhentheyreachacertainsize.WriterAppenderWriterAppenderappendslogeventstoaWriteroranOutputStreamdependingontheuser'schoice.

    Classesinorg.apache.log4jusedbyorg.apache.log4j.xmlAppenderImplementthisinterfaceforyourownstrategiesforoutputtinglogstatements.LayoutExtendthisabstractclasstocreateyourownloglayoutformat.LoggerThisisthecentralclassinthelog4jpackage.

    Overview Package Class Use Tree Deprecated IndexHelp Log4j1.2.14PREVNEXT FRAMESNOFRAMES

    Copyright2000-2005ApacheSoftwareFoundation.

    http://java.sun.com/j2se/1.3/docs/api/java/io/Writer.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/io/OutputStream.html

  • Overview Package Class Use Tree Deprecated IndexHelp Log4j1.2.14PREVCLASSNEXTCLASS FRAMESNOFRAMES

    SUMMARY:INNER|FIELD|CONSTR|METHOD DETAIL:FIELD|CONSTR|METHOD

  • org.apache.log4jInterfaceAppenderAllKnownImplementingClasses:

    AppenderSkeleton,JDBCAppender

    publicinterfaceAppender

    Implementthisinterfaceforyourownstrategiesforoutputtinglogstatements.

    Author:CekiGülcü

    MethodSummaryvoid

    addFilter(FilternewFilter)Addafiltertotheendofthefilterlist.

    voidclearFilters()Clearthelistoffiltersbyremovingallthefiltersinit.

    voidclose()Releaseanyresourcesallocatedwithintheappendersuchasfilehandles,networkconnections,etc.

    voiddoAppend(LoggingEventevent)LoginAppenderspecificway.

    ErrorHandlergetErrorHandler()ReturnstheErrorHandlerforthisappender.

    FiltergetFilter()ReturnstheheadFilter.

    LayoutgetLayout()Returnsthisappenderslayout.

    StringgetName()Getthenameofthisappender.requiresLayout()

    http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html

  • boolean Configuratorscallthismethodtodetermineiftheappenderrequiresalayout.

    voidsetErrorHandler(ErrorHandlererrorHandler)SettheErrorHandlerforthisappender.

    voidsetLayout(Layoutlayout)SettheLayoutforthisappender.

    voidsetName(Stringname)Setthenameofthisappender.

    MethodDetail

    addFilter

    publicvoidaddFilter(FilternewFilter)

    Addafiltertotheendofthefilterlist.Since:

    0.9.0

    getFilter

    publicFiltergetFilter()

    ReturnstheheadFilter.TheFiltersareorganizedinalinkedlistandsoallFiltersonthisAppenderareavailablethroughtheresult.Returns:

    theheadFilterornull,ifnoFiltersarepresentSince:

    1.1

    clearFilters

    publicvoidclearFilters()

    http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html

  • Clearthelistoffiltersbyremovingallthefiltersinit.Since:

    0.9.0

    close

    publicvoidclose()

    Releaseanyresourcesallocatedwithintheappendersuchasfilehandles,networkconnections,etc.

    Itisaprogrammingerrortoappendtoaclosedappender.

    Since:0.8.4

    doAppend

    publicvoiddoAppend(LoggingEventevent)

    LoginAppenderspecificway.Whenappropriate,LoggerswillcallthedoAppendmethodofappenderimplementationsinordertolog.

    getName

    publicStringgetName()

    Getthenameofthisappender.Thenameuniquelyidentifiestheappender.

    setErrorHandler

    publicvoidsetErrorHandler(ErrorHandlererrorHandler)

    SettheErrorHandlerforthisappender.Since:

    http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html

  • 0.9.0

    getErrorHandler

    publicErrorHandlergetErrorHandler()

    ReturnstheErrorHandlerforthisappender.Since:

    1.1

    setLayout

    publicvoidsetLayout(Layoutlayout)

    SettheLayoutforthisappender.Since:

    0.8.1

    getLayout

    publicLayoutgetLayout()

    Returnsthisappenderslayout.Since:

    1.1

    setName

    publicvoidsetName(Stringname)

    Setthenameofthisappender.Thenameisusedbyothercomponentstoidentifythisappender.Since:

    0.8.1

    http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html

  • requiresLayout

    publicbooleanrequiresLayout()

    Configuratorscallthismethodtodetermineiftheappenderrequiresalayout.Ifthismethodreturnstrue,meaningthatlayoutisrequired,thentheconfiguratorwillconfigureanlayoutusingtheconfigurationinformationatitsdisposal.Ifthismethodreturnsfalse,meaningthatalayoutisnotrequired,thenlayoutconfigurationwillbeskippedevenifthereisavailablelayoutconfigurationinformationatthedisposaloftheconfigurator..

    Intheratherexceptionalcase,wheretheappenderimplementationadmitsalayoutbutcanalsoworkwithoutit,thentheappendershouldreturntrue.

    Since:0.8.4

    Overview Package Class Use Tree Deprecated IndexHelp Log4j1.2.14PREVCLASSNEXTCLASS FRAMESNOFRAMES

    SUMMARY:INNER|FIELD|CONSTR|METHOD DETAIL:FIELD|CONSTR|METHOD

    Copyright2000-2005ApacheSoftwareFoundation.

  • Overview Package Class Use Tree Deprecated IndexHelp Log4j1.2.14PREVCLASSNEXTCLASS FRAMESNOFRAMES

    SUMMARY:INNER|FIELD|CONSTR|METHOD DETAIL:FIELD|CONSTR|METHOD

  • org.apache.log4jClassAppenderSkeletonjava.lang.Object|+--org.apache.log4j.AppenderSkeleton

    AllImplementedInterfaces:Appender,OptionHandler

    DirectKnownSubclasses:AsyncAppender,JDBCAppender,JMSAppender,LF5Appender,NTEventLogAppender,NullAppender,NullAppender,SMTPAppender,SocketAppender,SocketHubAppender,SyslogAppender,TelnetAppender,WriterAppender

    publicabstractclassAppenderSkeletonextendsObjectimplementsAppender,OptionHandler

    Abstractsuperclassoftheotherappendersinthepackage.Thisclassprovidesthecodeforcommonfunctionality,suchassupportforthresholdfilteringandsupportforgeneralfilters.

    Since:0.8.1

    Author:CekiGülcü

    FieldSummaryprotectedboolean

    closedIsthisappenderclosed?

    protectedErrorHandler

    errorHandlerItisassumedandenforcedthaterrorHandlerisnevernull.

    protected headFilter

    http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html

  • Filter Thefirstfilterinthefilterchain.

    protectedLayout

    layoutThelayoutvariabledoesnotneedtobesetiftheappenderimplementationhasitsownlayout.

    protectedString

    nameAppendersarenamed.

    protectedFilter

    tailFilterThelastfilterinthefilterchain.

    protectedPriority

    thresholdThereisnolevelthresholdfilteringbydefault.

    ConstructorSummaryAppenderSkeleton()

    MethodSummaryvoid

    activateOptions()Derivedappendersshouldoverridethismethodifoptionstructurerequiresit.

    voidaddFilter(FilternewFilter)Addafiltertoendofthefilterlist.

    protectedabstract

    void

    append(LoggingEventevent)SubclassesofAppenderSkeletonshouldimplementthismethodtoperformactuallogging.

    voidclearFilters()Clearthefilterschain.

    void

    doAppend(LoggingEventevent)Thismethodperformsthresholdchecksandinvokesfiltersbeforedelegatingactualloggingtothesubclassesspecificappend(org.apache.log4j.spi.LoggingEvent)method.

    void

    finalize()Finalizethisappenderbycallingthederivedclass'

    http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html

  • closemethod.

    ErrorHandlergetErrorHandler()ReturnthecurrentlysetErrorHandlerforthisAppender.

    FiltergetFilter()ReturnstheheadFilter.

    FiltergetFirstFilter()ReturnthefirstfilterinthefilterchainforthisAppender.

    LayoutgetLayout()Returnsthelayoutofthisappender.

    StringgetName()ReturnsthenameofthisFileAppender.

    PrioritygetThreshold()Returnsthisappendersthresholdlevel.

    booleanisAsSevereAsThreshold(Prioritypriority)Checkwhetherthemessagelevelisbelowtheappender'sthreshold.

    voidsetErrorHandler(ErrorHandlereh)SettheErrorHandlerforthisAppender.

    voidsetLayout(Layoutlayout)Setthelayoutforthisappender.

    voidsetName(Stringname)SetthenameofthisAppender.

    voidsetThreshold(Prioritythreshold)Setthethresholdlevel.

    Methodsinheritedfromclassjava.lang.Objectclone,equals,getClass,hashCode,notify,notifyAll,toString,wait,wait,wait

    Methodsinheritedfrominterfaceorg.apache.log4j.Appenderclose,requiresLayout

    http://java.sun.com/j2se/1.3/docs/api/java/lang/String.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/String.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#clone()http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#equals(java.lang.Object)http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#getClass()http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#hashCode()http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notify()http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notifyAll()http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#toString()http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait()http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait(long)http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait(long, int)

  • FieldDetail

    layout

    protectedLayoutlayout

    Thelayoutvariabledoesnotneedtobesetiftheappenderimplementationhasitsownlayout.

    name

    protectedStringname

    Appendersarenamed.

    threshold

    protectedPrioritythreshold

    Thereisnolevelthresholdfilteringbydefault.

    errorHandler

    protectedErrorHandlererrorHandler

    ItisassumedandenforcedthaterrorHandlerisnevernull.

    headFilter

    protectedFilterheadFilter

    Thefirstfilterinthefilterchain.Settonullinitially.

    http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html

  • tailFilter

    protectedFiltertailFilter

    Thelastfilterinthefilterchain.

    closed

    protectedbooleanclosed

    Isthisappenderclosed?

    ConstructorDetailAppenderSkeleton

    publicAppenderSkeleton()

    MethodDetailactivateOptions

    publicvoidactivateOptions()

    Derivedappendersshouldoverridethismethodifoptionstructurerequiresit.Specifiedby:

    activateOptionsininterfaceOptionHandler

    addFilter

    publicvoidaddFilter(FilternewFilter)

    Addafiltertoendofthefilterlist.Specifiedby:

  • addFilterininterfaceAppenderSince:

    0.9.0

    append

    protectedabstractvoidappend(LoggingEventevent)

    SubclassesofAppenderSkeletonshouldimplementthismethodtoperformactuallogging.SeealsoAppenderSkeleton.doAppendmethod.Since:

    0.9.0

    clearFilters

    publicvoidclearFilters()

    Clearthefilterschain.Specifiedby:

    clearFiltersininterfaceAppenderSince:

    0.9.0

    finalize

    publicvoidfinalize()

    Finalizethisappenderbycallingthederivedclass'closemethod.Overrides:

    finalizeinclassObjectSince:

    0.8.4

    getErrorHandler

    http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#finalize()http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html

  • publicErrorHandlergetErrorHandler()

    ReturnthecurrentlysetErrorHandlerforthisAppender.Specifiedby:

    getErrorHandlerininterfaceAppenderSince:

    0.9.0

    getFilter

    publicFiltergetFilter()

    ReturnstheheadFilter.Specifiedby:

    getFilterininterfaceAppenderSince:

    1.1

    getFirstFilter

    publicfinalFiltergetFirstFilter()

    ReturnthefirstfilterinthefilterchainforthisAppender.Thereturnvaluemaybenullifnoisfilterisset.

    getLayout

    publicLayoutgetLayout()

    Returnsthelayoutofthisappender.Thevaluemaybenull.Specifiedby:

    getLayoutininterfaceAppender

    getName

    publicfinalStringgetName()

    http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html

  • ReturnsthenameofthisFileAppender.Specifiedby:

    getNameininterfaceAppender

    getThreshold

    publicPrioritygetThreshold()

    Returnsthisappendersthresholdlevel.SeethesetThreshold(org.apache.log4j.Priority)methodforthemeaningofthisoption.Since:

    1.1

    isAsSevereAsThreshold

    publicbooleanisAsSevereAsThreshold(Prioritypriority)

    Checkwhetherthemessagelevelisbelowtheappender'sthreshold.Ifthereisnothresholdset,thenthereturnvalueisalwaystrue.

    doAppend

    publicvoiddoAppend(LoggingEventevent)

    Thismethodperformsthresholdchecksandinvokesfiltersbeforedelegatingactualloggingtothesubclassesspecificappend(org.apache.log4j.spi.LoggingEvent)method.Specifiedby:

    doAppendininterfaceAppender

    setErrorHandler

    publicvoidsetErrorHandler(ErrorHandlereh)

  • SettheErrorHandlerforthisAppender.Specifiedby:

    setErrorHandlerininterfaceAppenderSince:

    0.9.0

    setLayout

    publicvoidsetLayout(Layoutlayout)

    Setthelayoutforthisappender.Notethatsomeappendershavetheirown(fixed)layoutsordonotuseone.Forexample,theSocketAppenderignoresthelayoutsethere.Specifiedby:

    setLayoutininterfaceAppender

    setName

    publicvoidsetName(Stringname)

    SetthenameofthisAppender.Specifiedby:

    setNameininterfaceAppender

    setThreshold

    publicvoidsetThreshold(Prioritythreshold)

    Setthethresholdlevel.Alllogeventswithlowerlevelthanthethresholdlevelareignoredbytheappender.

    InconfigurationfilesthisoptionisspecifiedbysettingthevalueoftheThresholdoptiontoalevelstring,suchas"DEBUG","INFO"andsoon.

    Since:

    http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html

  • 0.8.3

    Overview Package Class Use Tree Deprecated IndexHelp Log4j1.2.14PREVCLASSNEXTCLASS FRAMESNOFRAMES

    SUMMARY:INNER|FIELD|CONSTR|METHOD DETAIL:FIELD|CONSTR|METHOD

    Copyright2000-2005ApacheSoftwareFoundation.

  • Overview Package Class Use Tree Deprecated IndexHelp Log4j1.2.14PREVCLASSNEXTCLASS FRAMESNOFRAMES

    SUMMARY:INNER|FIELD|CONSTR|METHOD DETAIL:FIELD|CONSTR|METHOD

  • org.apache.log4jClassAsyncAppenderjava.lang.Object|+--org.apache.log4j.AppenderSkeleton|+--org.apache.log4j.AsyncAppender

    AllImplementedInterfaces:Appender,AppenderAttachable,OptionHandler

    publicclassAsyncAppenderextendsAppenderSkeletonimplementsAppenderAttachable

    TheAsyncAppenderletsuserslogeventsasynchronously.

    TheAsyncAppenderwillcollecttheeventssenttoitandthendispatchthemtoalltheappendersthatareattachedtoit.YoucanattachmultipleappenderstoanAsyncAppender.

    TheAsyncAppenderusesaseparatethreadtoservetheeventsinitsbuffer.

    Importantnote:TheAsyncAppendercanonlybescriptconfiguredusingtheDOMConfigurator.

    Since:0.9.1

    Author:CekiGülcü,CurtArnold

    FieldSummarystaticint

    DEFAULT_BUFFER_SIZEThedefaultbuffersizeissetto128events.

    http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html

  • Fieldsinheritedfromclassorg.apache.log4j.AppenderSkeletonclosed,errorHandler,headFilter,layout,name,tailFilter,threshold

    ConstructorSummaryAsyncAppender()Createnewinstance.

    MethodSummaryvoid

    addAppender(AppendernewAppender)Addappender.

    voidappend(LoggingEventevent){@inheritDoc}

    voidclose()ClosethisAsyncAppenderbyinterruptingthedispatcherthreadwhichwillprocessallpendingeventsbeforeexiting.

    EnumerationgetAllAppenders()Getiteratoroverattachedappenders.

    AppendergetAppender(Stringname)Getappenderbyname.

    booleangetBlocking()Getswhetherappendershouldblockcallingthreadwhenbufferisfull.

    intgetBufferSize()Getsthecurrentbuffersize.

    booleangetLocationInfo()Getswhetherthelocationoftheloggingrequestcallshouldbecaptured.

    booleanisAttached(Appenderappender)Determinesifspecifiedappenderisattached.

    voidremoveAllAppenders()Removesandclosesallattachedappenders.

    voidremoveAppender(Appenderappender)

    http://java.sun.com/j2se/1.3/docs/api/java/util/Enumeration.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/String.html

  • Removesanappender.

    voidremoveAppender(Stringname)Removeappenderbyname.

    booleanrequiresLayout(){@inheritDoc}

    voidsetBlocking(booleanvalue)Setswhetherappendershouldwaitifthereisnospaceavailableintheeventbufferorimmediatelyreturn.

    void

    setBufferSize(intsize)Setsthenumberofmessagesallowedintheeventbufferbeforethecallingthreadisblocked(ifblockingistrue)oruntilmessagesaresummarizedanddiscarded.

    voidsetLocationInfo(booleanflag)TheLocationInfooptiontakesabooleanvalue.

    Methodsinheritedfromclassorg.apache.log4j.AppenderSkeletonactivateOptions,addFilter,clearFilters,doAppend,finalize,getErrorHandler,getFilter,getFirstFilter,getLayout,getName,getThreshold,isAsSevereAsThreshold,setErrorHandler,setLayout,setName,setThreshold

    Methodsinheritedfromclassjava.lang.Objectclone,equals,getClass,hashCode,notify,notifyAll,toString,wait,wait,wait

    FieldDetail

    DEFAULT_BUFFER_SIZE

    publicstaticfinalintDEFAULT_BUFFER_SIZE

    Thedefaultbuffersizeissetto128events.

    ConstructorDetail

    http://java.sun.com/j2se/1.3/docs/api/java/lang/String.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#clone()http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#equals(java.lang.Object)http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#getClass()http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#hashCode()http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notify()http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notifyAll()http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#toString()http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait()http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait(long)http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait(long, int)

  • AsyncAppender

    publicAsyncAppender()

    Createnewinstance.

    MethodDetailaddAppender

    publicvoidaddAppender(AppendernewAppender)

    Addappender.Specifiedby:

    addAppenderininterfaceAppenderAttachableParameters:

    newAppender-appendertoadd,maynotbenull.

    append

    publicvoidappend(LoggingEventevent)

    {@inheritDoc}Overrides:

    appendinclassAppenderSkeleton

    close

    publicvoidclose()

    ClosethisAsyncAppenderbyinterruptingthedispatcherthreadwhichwillprocessallpendingeventsbeforeexiting.

    getAllAppenders

  • publicEnumerationgetAllAppenders()

    Getiteratoroverattachedappenders.Specifiedby:

    getAllAppendersininterfaceAppenderAttachableReturns:

    iteratorornullifnoattachedappenders.

    getAppender

    publicAppendergetAppender(Stringname)

    Getappenderbyname.Specifiedby:

    getAppenderininterfaceAppenderAttachableParameters:

    name-name,maynotbenull.Returns:

    matchingappenderornull.

    getLocationInfo

    publicbooleangetLocationInfo()

    Getswhetherthelocationoftheloggingrequestcallshouldbecaptured.Returns:

    thecurrentvalueoftheLocationInfooption.

    isAttached

    publicbooleanisAttached(Appenderappender)

    Determinesifspecifiedappenderisattached.Specifiedby:

    isAttachedininterfaceAppenderAttachableParameters:

    http://java.sun.com/j2se/1.3/docs/api/java/util/Enumeration.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/String.html

  • appender-appender.Returns:

    trueifattached.

    requiresLayout

    publicbooleanrequiresLayout()

    {@inheritDoc}

    removeAllAppenders

    publicvoidremoveAllAppenders()

    Removesandclosesallattachedappenders.Specifiedby:

    removeAllAppendersininterfaceAppenderAttachable

    removeAppender

    publicvoidremoveAppender(Appenderappender)

    Removesanappender.Specifiedby:

    removeAppenderininterfaceAppenderAttachableParameters:

    appender-appendertoremove.

    removeAppender

    publicvoidremoveAppender(Stringname)

    Removeappenderbyname.Specifiedby:

    removeAppenderininterfaceAppenderAttachable

    http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html

  • Parameters:name-name.

    setLocationInfo

    publicvoidsetLocationInfo(booleanflag)

    TheLocationInfooptiontakesabooleanvalue.Bydefault,itissettofalsewhichmeanstherewillbenoefforttoextractthelocationinformationrelatedtotheevent.Asaresult,theeventthatwillbeultimatelyloggedwilllikelytocontainthewronglocationinformation(ifpresentinthelogformat).

    Locationinformationextractioniscomparativelyveryslowandshouldbeavoidedunlessperformanceisnotaconcern.

    Parameters:flag-trueiflocationinformationshouldbeextracted.

    setBufferSize

    publicvoidsetBufferSize(intsize)

    Setsthenumberofmessagesallowedintheeventbufferbeforethecallingthreadisblocked(ifblockingistrue)oruntilmessagesaresummarizedanddiscarded.Changingthesizewillnotaffectmessagesalreadyinthebuffer.Parameters:

    size-buffersize,mustbepositive.

    getBufferSize

    publicintgetBufferSize()

    Getsthecurrentbuffersize.Returns:

  • thecurrentvalueoftheBufferSizeoption.

    setBlocking

    publicvoidsetBlocking(booleanvalue)

    Setswhetherappendershouldwaitifthereisnospaceavailableintheeventbufferorimmediatelyreturn.Parameters:

    value-trueifappendershouldwaituntilavailablespaceinbuffer.

    getBlocking

    publicbooleangetBlocking()

    Getswhetherappendershouldblockcallingthreadwhenbufferisfull.Iffalse,messageswillbecountedbyloggerandasummarymessageappendedafterthecontentsofthebufferhavebeenappended.Returns:

    trueifcallingthreadwillbeblockedwhenbufferisfull.

    Overview Package Class Use Tree Deprecated IndexHelp Log4j1.2.14PREVCLASSNEXTCLASS FRAMESNOFRAMES

    SUMMARY:INNER|FIELD|CONSTR|METHOD DETAIL:FIELD|CONSTR|METHOD

    Copyright2000-2005ApacheSoftwareFoundation.

  • Overview Package Class Use Tree Deprecated IndexHelp Log4j1.2.14PREVCLASSNEXTCLASS FRAMESNOFRAMES

    SUMMARY:INNER|FIELD|CONSTR|METHOD DETAIL:FIELD|CONSTR|METHOD

  • org.apache.log4jClassBasicConfiguratorjava.lang.Object|+--org.apache.log4j.BasicConfigurator

    publicclassBasicConfiguratorextendsObject

    Usethisclasstoquicklyconfigurethepackage.

    ForfilebasedconfigurationseePropertyConfigurator.ForXMLbasedconfigurationseeDOMConfigurator.

    Since:0.8.1

    Author:CekiGülcü

    ConstructorSummaryprotected

    BasicConfigurator()

    MethodSummary

    staticvoid

    configure()AddaConsoleAppenderthatusesPatternLayoutusingthePatternLayout.TTCC_CONVERSION_PATTERNandprintstoSystem.outtotherootcategory.

    staticvoidconfigure(Appenderappender)Addappendertotherootcategory.

    staticvoidresetConfiguration()Resetthedefaulthierarchytoitsdefaut.

    http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html

  • Methodsinheritedfromclassjava.lang.Objectclone,equals,finalize,getClass,hashCode,notify,notifyAll,toString,wait,wait,wait

    ConstructorDetail

    BasicConfigurator

    protectedBasicConfigurator()

    MethodDetail

    configure

    publicstaticvoidconfigure()

    AddaConsoleAppenderthatusesPatternLayoutusingthePatternLayout.TTCC_CONVERSION_PATTERNandprintstoSystem.outtotherootcategory.

    configure

    publicstaticvoidconfigure(Appenderappender)

    Addappendertotherootcategory.Parameters:

    appender-Theappendertoaddtotherootcategory.

    resetConfiguration

    publicstaticvoidresetConfiguration()

    Resetthedefaulthierarchytoitsdefaut.ItisequivalenttocallingCategory.getDefaultHierarchy().resetConfiguration().See

    http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#clone()http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#equals(java.lang.Object)http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#finalize()http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#getClass()http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#hashCode()http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notify()http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notifyAll()http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#toString()http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait()http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait(long)http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait(long, int)

  • Hierarchy.resetConfiguration()formoredetails.

    Overview Package Class Use Tree Deprecated IndexHelp Log4j1.2.14PREVCLASSNEXTCLASS FRAMESNOFRAMES

    SUMMARY:INNER|FIELD|CONSTR|METHOD DETAIL:FIELD|CONSTR|METHOD

    Copyright2000-2005ApacheSoftwareFoundation.

  • Overview Package Class Use Tree Deprecated IndexHelp Log4j1.2.14PREVCLASSNEXTCLASS FRAMESNOFRAMES

    SUMMARY:INNER|FIELD|CONSTR|METHOD DETAIL:FIELD|CONSTR|METHOD

  • org.apache.log4jClassCategoryjava.lang.Object|+--org.apache.log4j.Category

    AllImplementedInterfaces:AppenderAttachable

    DirectKnownSubclasses:Logger

    publicclassCategoryextendsObjectimplementsAppenderAttachable

    ThisclasshasbeendeprecatedandreplacedbytheLoggersubclass.Itwillbekeptaroundtopreservebackwardcompatibilityuntilmid2003.

    LoggerisasubclassofCategory,i.e.itextendsCategory.Inotherwords,aloggerisacategory.Thus,alloperationsthatcanbeperformedonacategorycanbeperformedonalogger.Internally,wheneverlog4jisaskedtoproduceaCategoryobject,itwillinsteadproduceaLoggerobject.Log4j1.2willneverproduceCategoryobjectsbutonlyLoggerinstances.Inordertopreservebackwardcompatibility,methodsthatpreviouslyacceptedcategoryobjectsstillcontinuetoacceptcategoryobjects.

    Forexample,thefollowingarealllegalandwillworkasexpected.

    //Deprecatedform:Categorycat=Category.getInstance("foo.bar")

    //Preferredformforretrievingloggers:Loggerlogger=Logger.getLogger("foo.bar")

    Thefirstformisdeprecatedandshouldbeavoided.

    http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html

  • ThereisabsolutelynoneedfornewclientcodetouseorrefertotheCategoryclass.Wheneverpossible,pleaseavoidreferringtoitorusingit.

    Seetheshortmanualforanintroductiononthisclass.

    Seethedocumententitledpreparingforlog4j1.3foramoredetaileddiscussion.

    Author:CekiGülcü,AndersKristensen

    FieldSummaryprotectedboolean

    additiveAdditivityissettotruebydefault,thatischildreninherittheappendersoftheirancestorsbydefault.

    protectedLevellevelTheassignedlevelofthiscategory.

    protectedStringnameThenameofthiscategory.

    protectedCategory

    parentTheparentofthiscategory.

    protectedLoggerRepository

    repository

    protectedResourceBundle

    resourceBundle

    ConstructorSummaryprotected

    Category(Stringname)ThisconstructorcreatedanewCategoryinstanceandsetsitsname.

    MethodSummary

    http://www.qos.ch/logging/preparingFor13.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/String.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/util/ResourceBundle.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/String.html

  • voidaddAppender(AppendernewAppender)AddnewAppendertothelistofappendersofthisCategoryinstance.

    voidassertLog(booleanassertion,Stringmsg)Ifassertionparameterisfalse,thenlogsmsgasanerrorstatement.

    voidcallAppenders(LoggingEventevent)Calltheappendersinthehierrachystartingatthis.

    voiddebug(Objectmessage)LogamessageobjectwiththeDEBUGlevel.

    void

    debug(Objectmessage,Throwablet)LogamessageobjectwiththeDEBUGlevelincludingthestacktraceoftheThrowabletpassedasparameter.

    voiderror(Objectmessage)LogamessageobjectwiththeERRORLevel.

    void

    error(Objectmessage,Throwablet)LogamessageobjectwiththeERRORlevelincludingthestacktraceoftheThrowabletpassedasparameter.

    staticLoggerexists(Stringname)Deprecated.PleaseuseLogManager.exists(java.lang.String)instead.

    voidfatal(Objectmessage)LogamessageobjectwiththeFATALLevel.

    void

    fatal(Objectmessage,Throwablet)LogamessageobjectwiththeFATALlevelincludingthestacktraceoftheThrowabletpassedasparameter.

    protectedvoid

    forcedLog(Stringfqcn,Prioritylevel,Objectmessage,Throwablet)Thismethodcreatesanewloggingeventandlogstheeventwithoutfurtherchecks.

    boolean

    getAdditivity()GettheadditivityflagforthisCategory

    http://java.sun.com/j2se/1.3/docs/api/java/lang/String.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/String.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/String.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.html

  • instance.

    EnumerationgetAllAppenders()GettheappenderscontainedinthiscategoryasanEnumeration.

    AppendergetAppender(Stringname)Lookfortheappendernamedasname.

    PrioritygetChainedPriority()Deprecated.PleaseusethethegetEffectiveLevel()methodinstead.

    staticEnumerationgetCurrentCategories()Deprecated.PleaseuseLogManager.getCurrentLoggers()instead.

    staticLoggerRepositorygetDefaultHierarchy()Deprecated.PleaseuseLogManager.getLoggerRepository()instead.

    LevelgetEffectiveLevel()Startingfromthiscategory,searchthecategoryhierarchyforanon-nulllevelandreturnit.

    LoggerRepositorygetHierarchy()Deprecated.PleaseusegetLoggerRepository()instead.

    staticCategorygetInstance(Classclazz)Deprecated.PleasemakesuretouseLogger.getLogger(Class)instead.

    staticCategorygetInstance(Stringname)Deprecated.MakesuretouseLogger.getLogger(String)instead.

    LevelgetLevel()ReturnstheassignedLevel,ifany,forthisCategory.

    LoggerRepositorygetLoggerRepository()ReturnthetheLoggerRepositorywherethisCategoryisattached.

    StringgetName()Returnthecategoryname.

    http://java.sun.com/j2se/1.3/docs/api/java/util/Enumeration.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/util/Enumeration.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/String.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/util/Enumeration.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Class.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/String.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/String.html

  • Category getParent()Returnstheparentofthiscategory.

    LevelgetPriority()Deprecated.PleaseusegetLevel()instead.

    ResourceBundlegetResourceBundle()ReturntheinheritedResourceBundleforthiscategory.

    protectedStringgetResourceBundleString(Stringkey)Returnsthestringresourcecorespondingtokeyinthiscategory'sinheritedresourcebundle.

    staticCategorygetRoot()Deprecated.PleaseuseLogger.getRootLogger()instead.

    voidinfo(Objectmessage)LogamessageobjectwiththeINFOLevel.

    void

    info(Objectmessage,Throwablet)LogamessageobjectwiththeINFOlevelincludingthestacktraceoftheThrowabletpassedasparameter.

    booleanisAttached(Appenderappender)Istheappenderpassedasparameterattachedtothiscategory?

    booleanisDebugEnabled()CheckwhetherthiscategoryisenabledfortheDEBUGLevel.

    booleanisEnabledFor(Prioritylevel)CheckwhetherthiscategoryisenabledforagivenLevelpassedasparameter.

    booleanisInfoEnabled()CheckwhetherthiscategoryisenabledfortheinfoLevel.

    void

    l7dlog(Prioritypriority,Stringkey,Object[]params,Throwablet)Logalocalizedandparameterizedmessage.

    void

    l7dlog(Prioritypriority,Stringkey,Throwablet)

    http://java.sun.com/j2se/1.3/docs/api/java/util/ResourceBundle.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/util/ResourceBundle.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/String.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/String.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/String.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/String.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.html

  • Logalocalizedmessage.

    void

    log(Prioritypriority,Objectmessage)Thisgenericformisintendedtobeusedbywrappers.

    void

    log(Prioritypriority,Objectmessage,Throwablet)Thisgenericformisintendedtobeusedbywrappers.

    void

    log(StringcallerFQCN,Prioritylevel,Objectmessage,Throwablet)Thisisthemostgenericprintingmethod.

    voidremoveAllAppenders()RemoveallpreviouslyaddedappendersfromthisCategoryinstance.

    voidremoveAppender(Appenderappender)Removetheappenderpassedasparameterformthelistofappenders.

    voidremoveAppender(Stringname)Removetheappenderwiththenamepassedasparameterformthelistofappenders.

    voidsetAdditivity(booleanadditive)SettheadditivityflagforthisCategoryinstance.

    voidsetLevel(Levellevel)SetthelevelofthisCategory.

    voidsetPriority(Prioritypriority)Deprecated.PleaseusesetLevel(org.apache.log4j.Level)instead.

    void

    setResourceBundle(ResourceBundlebundle)Settheresourcebundletobeusedwithlocalizedloggingmethodsl7dlog(Priority,String,Throwable)andl7dlog(Priority,String,Object[],Throwable).

    staticvoidshutdown()Deprecated.Pleaseuse

    http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/String.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/String.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/util/ResourceBundle.html

  • LogManager.shutdown()instead.

    voidwarn(Objectmessage)LogamessageobjectwiththeWARNLevel.

    void

    warn(Objectmessage,Throwablet)LogamessagewiththeWARNlevelincludingthestacktraceoftheThrowabletpassedasparameter.

    Methodsinheritedfromclassjava.lang.Objectclone,equals,finalize,getClass,hashCode,notify,notifyAll,toString,wait,wait,wait

    FieldDetail

    name

    protectedStringname

    Thenameofthiscategory.

    level

    protectedvolatileLevellevel

    Theassignedlevelofthiscategory.Thelevelvariableneednotbeassignedavalueinwhichcaseitisinheritedformthehierarchy.

    parent

    protectedvolatileCategoryparent

    Theparentofthiscategory.Allcategorieshaveatleastoneancestorwhichistherootcategory.

    http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#clone()http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#equals(java.lang.Object)http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#finalize()http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#getClass()http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#hashCode()http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notify()http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notifyAll()http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#toString()http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait()http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait(long)http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait(long, int)http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html

  • resourceBundle

    protectedResourceBundleresourceBundle

    repository

    protectedLoggerRepositoryrepository

    additive

    protectedbooleanadditive

    Additivityissettotruebydefault,thatischildreninherittheappendersoftheirancestorsbydefault.Ifthisvariableissettofalsethentheappendersfoundintheancestorsofthiscategoryarenotused.However,thechildrenofthiscategorywillinherititsappenders,unlessthechildrenhavetheiradditivityflagsettofalsetoo.Seetheusermanualformoredetails.

    ConstructorDetailCategory

    protectedCategory(Stringname)

    ThisconstructorcreatedanewCategoryinstanceandsetsitsname.

    Itisintendedtobeusedbysub-classesonly.Youshouldnotcreatecategoriesdirectly.

    Parameters:name-Thenameofthecategory.

    MethodDetail

    http://java.sun.com/j2se/1.3/docs/api/java/util/ResourceBundle.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/String.html

  • addAppender

    publicvoidaddAppender(AppendernewAppender)

    AddnewAppendertothelistofappendersofthisCategoryinstance.

    IfnewAppenderisalreadyinthelistofappenders,thenitwon'tbeaddedagain.

    Specifiedby:addAppenderininterfaceAppenderAttachable

    assertLog

    publicvoidassertLog(booleanassertion,Stringmsg)

    Ifassertionparameterisfalse,thenlogsmsgasanerrorstatement.

    TheassertmethodhasbeenrenamedtoassertLogbecauseassertisalanguagereservedwordinJDK1.4.

    Parameters:assertion-msg-Themessagetoprintifassertionisfalse.

    Since:1.2

    callAppenders

    publicvoidcallAppenders(LoggingEventevent)

    Calltheappendersinthehierrachystartingatthis.Ifnoappenderscouldbefound,emitawarning.

    Thismethodcallsalltheappendersinheritedfromthehierarchycircumventinganyevaluationofwhethertologornottologtheparticularlogrequest.

    http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html

  • Parameters:event-theeventtolog.

    debug

    publicvoiddebug(Objectmessage)

    LogamessageobjectwiththeDEBUGlevel.

    ThismethodfirstchecksifthiscategoryisDEBUGenabledbycomparingthelevelofthiscategorywiththeDEBUGlevel.IfthiscategoryisDEBUGenabled,thenitconvertsthemessageobject(passedasparameter)toastringbyinvokingtheappropriateObjectRenderer.Itthenproceedstocallalltheregisteredappendersinthiscategoryandalsohigherinthehierarchydependingonthevalueoftheadditivityflag.

    WARNINGNotethatpassingaThrowabletothismethodwillprintthenameoftheThrowablebutnostacktrace.Toprintastacktraceusethedebug(Object,Throwable)forminstead.

    Parameters:message-themessageobjecttolog.

    debug

    publicvoiddebug(Objectmessage,Throwablet)

    LogamessageobjectwiththeDEBUGlevelincludingthestacktraceoftheThrowabletpassedasparameter.

    Seedebug(Object)formformoredetailedinformation.

    Parameters:message-themessageobjecttolog.t-theexceptiontolog,includingitsstacktrace.

    http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.html

  • error

    publicvoiderror(Objectmessage)

    LogamessageobjectwiththeERRORLevel.

    ThismethodfirstchecksifthiscategoryisERRORenabledbycomparingthelevelofthiscategorywithERRORLevel.IfthiscategoryisERRORenabled,thenitconvertsthemessageobjectpassedasparametertoastringbyinvokingtheappropriateObjectRenderer.Itproceedstocallalltheregisteredappendersinthiscategoryandalsohigherinthehierarchydependingonthevalueoftheadditivityflag.

    WARNINGNotethatpassingaThrowabletothismethodwillprintthenameoftheThrowablebutnostacktrace.Toprintastacktraceusetheerror(Object,Throwable)forminstead.

    Parameters:message-themessageobjecttolog

    error

    publicvoiderror(Objectmessage,Throwablet)

    LogamessageobjectwiththeERRORlevelincludingthestacktraceoftheThrowabletpassedasparameter.

    Seeerror(Object)formformoredetailedinformation.

    Parameters:message-themessageobjecttolog.t-theexceptiontolog,includingitsstacktrace.

    exists

    publicstaticLoggerexists(Stringname)

    http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/String.html

  • Deprecated.PleaseuseLogManager.exists(java.lang.String)instead.

    Ifthenamedcategoryexists(inthedefaulthierarchy)thenitreturnsareferencetothecategory,otherwiseitreturnsnull.Since:

    0.8.5

    fatal

    publicvoidfatal(Objectmessage)

    LogamessageobjectwiththeFATALLevel.

    ThismethodfirstchecksifthiscategoryisFATALenabledbycomparingthelevelofthiscategorywithFATALLevel.IfthecategoryisFATALenabled,thenitconvertsthemessageobjectpassedasparametertoastringbyinvokingtheappropriateObjectRenderer.Itproceedstocallalltheregisteredappendersinthiscategoryandalsohigherinthehierarchydependingonthevalueoftheadditivityflag.

    WARNINGNotethatpassingaThrowabletothismethodwillprintthenameoftheThrowablebutnostacktrace.Toprintastacktraceusethefatal(Object,Throwable)forminstead.

    Parameters:message-themessageobjecttolog

    fatal

    publicvoidfatal(Objectmessage,Throwablet)

    LogamessageobjectwiththeFATALlevelincludingthestacktraceoftheThrowabletpassedasparameter.

    Seefatal(Object)formoredetailedinformation.

    http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.html

  • Parameters:message-themessageobjecttolog.t-theexceptiontolog,includingitsstacktrace.

    forcedLog

    protectedvoidforcedLog(Stringfqcn,Prioritylevel,Objectmessage,Throwablet)

    Thismethodcreatesanewloggingeventandlogstheeventwithoutfurtherchecks.

    getAdditivity

    publicbooleangetAdditivity()

    GettheadditivityflagforthisCategoryinstance.

    getAllAppenders

    publicEnumerationgetAllAppenders()

    GettheappenderscontainedinthiscategoryasanEnumeration.Ifnoappenderscanbefound,thenaNullEnumerationisreturned.Specifiedby:

    getAllAppendersininterfaceAppenderAttachableReturns:

    EnumerationAnenumerationoftheappendersinthiscategory.

    getAppender

    publicAppendergetAppender(Stringname)

    Lookfortheappendernamedasname.

    http://java.sun.com/j2se/1.3/docs/api/java/lang/String.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/util/Enumeration.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/util/Enumeration.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/String.html

  • Returntheappenderwiththatnameifinthelist.Returnnullotherwise.

    Specifiedby:getAppenderininterfaceAppenderAttachable

    getEffectiveLevel

    publicLevelgetEffectiveLevel()

    Startingfromthiscategory,searchthecategoryhierarchyforanon-nulllevelandreturnit.Otherwise,returntheleveloftherootcategory.

    TheCategoryclassisdesignedsothatthismethodexecutesasquicklyaspossible.

    getChainedPriority

    publicPrioritygetChainedPriority()

    Deprecated.PleaseusethethegetEffectiveLevel()methodinstead.

    getCurrentCategories

    publicstaticEnumerationgetCurrentCategories()

    Deprecated.PleaseuseLogManager.getCurrentLoggers()instead.

    ReturnsallthecurrentlydefinedcategoriesinthedefaulthierarchyasanEnumeration.

    TherootcategoryisnotincludedinthereturnedEnumeration.

    http://java.sun.com/j2se/1.3/docs/api/java/util/Enumeration.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/util/Enumeration.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/util/Enumeration.html

  • getDefaultHierarchy

    publicstaticLoggerRepositorygetDefaultHierarchy()

    Deprecated.PleaseuseLogManager.getLoggerRepository()instead.

    ReturnthedefaultHierarchyinstance.Since:

    1.0

    getHierarchy

    publicLoggerRepositorygetHierarchy()

    Deprecated.PleaseusegetLoggerRepository()instead.

    ReturnthetheHierarchywherethisCategoryinstanceisattached.Since:

    1.1

    getLoggerRepository

    publicLoggerRepositorygetLoggerRepository()

    ReturnthetheLoggerRepositorywherethisCategoryisattached.Since:

    1.2

    getInstance

    publicstaticCategorygetInstance(Stringname)

    Deprecated.MakesuretouseLogger.getLogger(String)instead.

    getInstance

    http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html

  • publicstaticCategorygetInstance(Classclazz)

    Deprecated.PleasemakesuretouseLogger.getLogger(Class)instead.

    getName

    publicfinalStringgetName()

    Returnthecategoryname.

    getParent

    publicfinalCategorygetParent()

    Returnstheparentofthiscategory.Notethattheparentofagivencategorymaychangeduringthelifetimeofthecategory.

    Therootcategorywillreturnnull.

    Since:1.2

    getLevel

    publicfinalLevelgetLevel()

    ReturnstheassignedLevel,ifany,forthisCategory.Returns:

    Level-theassignedLevel,canbenull.

    getPriority

    publicfinalLevelgetPriority()

    Deprecated.PleaseusegetLevel()instead.

    http://java.sun.com/j2se/1.3/docs/api/java/lang/Class.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/String.html

  • getRoot

    publicstaticfinalCategorygetRoot()

    Deprecated.PleaseuseLogger.getRootLogger()instead.

    getResourceBundle

    publicResourceBundlegetResourceBundle()

    ReturntheinheritedResourceBundleforthiscategory.

    Thismethodwalksthehierarchytofindtheappropriateresourcebundle.Itwillreturntheresourcebundleattachedtotheclosestancestorofthiscategory,muchlikethewayprioritiesaresearched.Incasethereisnobundleinthehierarchythennullisreturned.

    Since:0.9.0

    getResourceBundleString

    protectedStringgetResourceBundleString(Stringkey)

    Returnsthestringresourcecorespondingtokeyinthiscategory'sinheritedresourcebundle.SeealsogetResourceBundle().

    Iftheresourcecannotbefound,thenanerrormessagewillbeloggedcomplainingaboutthemissingresource.

    info

    publicvoidinfo(Objectmessage)

    LogamessageobjectwiththeINFOLevel.

    http://java.sun.com/j2se/1.3/docs/api/java/util/ResourceBundle.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/util/ResourceBundle.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/String.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/String.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html

  • ThismethodfirstchecksifthiscategoryisINFOenabledbycomparingthelevelofthiscategorywithINFOLevel.IfthecategoryisINFOenabled,thenitconvertsthemessageobjectpassedasparametertoastringbyinvokingtheappropriateObjectRenderer.Itproceedstocallalltheregisteredappendersinthiscategoryandalsohigherinthehierarchydependingonthevalueoftheadditivityflag.

    WARNINGNotethatpassingaThrowabletothismethodwillprintthenameoftheThrowablebutnostacktrace.Toprintastacktraceusetheinfo(Object,Throwable)forminstead.

    Parameters:message-themessageobjecttolog

    info

    publicvoidinfo(Objectmessage,Throwablet)

    LogamessageobjectwiththeINFOlevelincludingthestacktraceoftheThrowabletpassedasparameter.

    Seeinfo(Object)formoredetailedinformation.

    Parameters:message-themessageobjecttolog.t-theexceptiontolog,includingitsstacktrace.

    isAttached

    publicbooleanisAttached(Appenderappender)

    Istheappenderpassedasparameterattachedtothiscategory?Specifiedby:

    isAttachedininterfaceAppenderAttachable

    http://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.html

  • isDebugEnabled

    publicbooleanisDebugEnabled()

    CheckwhetherthiscategoryisenabledfortheDEBUGLevel.

    Thisfunctionisintendedtolessenthecomputationalcostofdisabledlogdebugstatements.

    ForsomecatCategoryobject,whenyouwrite,

    cat.debug("Thisisentrynumber:"+i);

    Youincurthecostconstructingthemessage,concatenatiioninthiscase,regardlessofwhetherthemessageisloggedornot.

    Ifyouareworriedaboutspeed,thenyoushouldwrite

    if(cat.isDebugEnabled()){ cat.debug("Thisisentrynumber:"+i); }

    Thiswayyouwillnotincurthecostofparameterconstructionifdebuggingisdisabledforcat.Ontheotherhand,ifthecatisdebugenabled,youwillincurthecostofevaluatingwhetherthecategoryisdebugenabledtwice.OnceinisDebugEnabledandonceinthedebug.Thisisaninsignificantoverheadsinceevaluatingacategorytakesabout1%%ofthetimeittakestoactuallylog.

    Returns:boolean-trueifthiscategoryisdebugenabled,falseotherwise.

    isEnabledFor

    publicbooleanisEnabledFor(Prioritylevel)

    CheckwhetherthiscategoryisenabledforagivenLevelpassedas

  • parameter.SeealsoisDebugEnabled().Returns:

    booleanTrueifthiscategoryisenabledforlevel.

    isInfoEnabled

    publicbooleanisInfoEnabled()

    CheckwhetherthiscategoryisenabledfortheinfoLevel.SeealsoisDebugEnabled().Returns:

    boolean-trueifthiscategoryisenabledforlevelinfo,falseotherwise.

    l7dlog

    publicvoidl7dlog(Prioritypriority,Stringkey,Throwablet)

    Logalocalizedmessage.Theusersuppliedparameterkeyisreplacedbyitslocalizedversionfromtheresourcebundle.Since:

    0.8.4SeeAlso:

    setResourceBundle(java.util.ResourceBundle)

    l7dlog

    publicvoidl7dlog(Prioritypriority,Stringkey,Object[]params,Throwablet)

    Logalocalizedandparameterizedmessage.First,theusersuppliedkeyissearchedintheresourcebundle.Next,theresultingpatternisformattedusingMessageFormat.format(String,Object[])method

    http://java.sun.com/j2se/1.3/docs/api/java/lang/String.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/String.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/text/MessageFormat.html#format(java.lang.String, java.lang.Object[])

  • withtheusersuppliedobjectarrayparams.Since:

    0.8.4

    log

    publicvoidlog(Prioritypriority,Objectmessage,Throwablet)

    Thisgenericformisintendedtobeusedbywrappers.

    log

    publicvoidlog(Prioritypriority,Objectmessage)

    Thisgenericformisintendedtobeusedbywrappers.

    log

    publicvoidlog(StringcallerFQCN,Prioritylevel,Objectmessage,Throwablet)

    Thisisthemostgenericprintingmethod.Itisintendedtobeinvokedbywrapperclasses.Parameters:

    callerFQCN-Thewrapperclass'fullyqualifiedclassname.level-Theleveloftheloggingrequest.message-Themessageoftheloggingrequest.t-Thethrowableoftheloggingrequest,maybenull.

    removeAllAppenders

    publicvoidremoveAllAppenders()

    http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/String.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.html

  • RemoveallpreviouslyaddedappendersfromthisCategoryinstance.

    Thisisusefulwhenre-readingconfigurationinformation.

    Specifiedby:removeAllAppendersininterfaceAppenderAttachable

    removeAppender

    publicvoidremoveAppender(Appenderappender)

    Removetheappenderpassedasparameterformthelistofappenders.Specifiedby:

    removeAppenderininterfaceAppenderAttachableSince:

    0.8.2

    removeAppender

    publicvoidremoveAppender(Stringname)

    Removetheappenderwiththenamepassedasparameterformthelistofappenders.Specifiedby:

    removeAppenderininterfaceAppenderAttachableSince:

    0.8.2

    setAdditivity

    publicvoidsetAdditivity(booleanadditive)

    SettheadditivityflagforthisCategoryinstance.Since:

    http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html

  • 0.8.1

    setLevel

    publicvoidsetLevel(Levellevel)

    SetthelevelofthisCategory.IfyouarepassinganyofLevel.DEBUG,Level.INFO,Level.WARN,Level.ERROR,Level.FATALasaparameter,youneedtocasethemasLevel.

    Asin

    logger.setLevel((Level)Level.DEBUG);

    Nullvaluesareadmitted.

    setPriority

    publicvoidsetPriority(Prioritypriority)

    Deprecated.PleaseusesetLevel(org.apache.log4j.Level)instead.

    SetthelevelofthisCategory.

    Nullvaluesareadmitted.

    setResourceBundle

    publicvoidsetResourceBundle(ResourceBundlebundle)

    Settheresourcebundletobeusedwithlocalizedloggingmethodsl7dlog(Priority,String,Throwable)andl7dlog(Priority,String,Object[],Throwable).Since:

    0.8.4

    http://java.sun.com/j2se/1.3/docs/api/java/util/ResourceBundle.html

  • shutdown

    publicstaticvoidshutdown()

    Deprecated.PleaseuseLogManager.shutdown()instead.

    Callingthismethodwillsafelycloseandremoveallappendersinallthecategoriesincludingrootcontainedinthedefaulthierachy.

    SomeappenderssuchasSocketAppenderandAsyncAppenderneedtobeclosedbeforetheapplicationexists.Otherwise,pendingloggingeventsmightbelost.

    Theshutdownmethodiscarefultoclosenestedappendersbeforeclosingregularappenders.Thisisallowsconfigurationswherearegularappenderisattachedtoacategoryandagaintoanestedappender.

    Since:1.0

    warn

    publicvoidwarn(Objectmessage)

    LogamessageobjectwiththeWARNLevel.

    ThismethodfirstchecksifthiscategoryisWARNenabledbycomparingthelevelofthiscategorywithWARNLevel.IfthecategoryisWARNenabled,thenitconvertsthemessageobjectpassedasparametertoastringbyinvokingtheappropriateObjectRenderer.Itproceedstocallalltheregisteredappendersinthiscategoryandalsohigherinthehieararchydependingonthevalueoftheadditivityflag.

    WARNINGNotethatpassingaThrowabletothismethodwillprintthenameoftheThrowablebutnostacktrace.Toprintastacktraceusethewarn(Object,Throwable)forminstead.

    http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.html

  • Parameters:message-themessageobjecttolog.

    warn

    publicvoidwarn(Objectmessage,Throwablet)

    LogamessagewiththeWARNlevelincludingthestacktraceoftheThrowabletpassedasparameter.

    Seewarn(Object)formoredetailedinformation.

    Parameters:message-themessageobjecttolog.t-theexceptiontolog,includingitsstacktrace.

    Overview Package Class Use Tree Deprecated IndexHelp Log4j1.2.14PREVCLASSNEXTCLASS FRAMESNOFRAMES

    SUMMARY:INNER|FIELD|CONSTR|METHOD DETAIL:FIELD|CONSTR|METHOD

    Copyright2000-2005ApacheSoftwareFoundation.

    http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.html

  • Overview Package Class Use Tree Deprecated IndexHelp Log4j1.2.14PREVCLASSNEXTCLASS FRAMESNOFRAMES

    SUMMARY:INNER|FIELD|CONSTR|METHOD DETAIL:FIELD|CONSTR|METHOD

  • org.apache.log4jClassConsoleAppenderjava.lang.Object|+--org.apache.log4j.AppenderSkeleton|+--org.apache.log4j.WriterAppender|+--org.apache.log4j.ConsoleAppender

    AllImplementedInterfaces:Appender,OptionHandler

    publicclassConsoleAppenderextendsWriterAppender

    ConsoleAppenderappendslogeventstoSystem.outorSystem.errusingalayoutspecifiedbytheuser.ThedefaulttargetisSystem.out.

    Since:1.1

    Author:CekiGülcü,CurtArnold

    FieldSummarystaticString

    SYSTEM_ERR

    staticStringSYSTEM_OUT

    protectedString

    target

    Fieldsinheritedfromclassorg.apache.log4j.WriterAppenderencoding,immediateFlush,qw

    http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/String.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/String.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/String.html

  • Fieldsinheritedfromclassorg.apache.log4j.AppenderSkeletonclosed,errorHandler,headFilter,layout,name,tailFilter,threshold

    ConstructorSummaryConsoleAppender()Constructsanunconfiguredappender.ConsoleAppender(Layoutlayout)Createsaconfiguredappender.ConsoleAppender(Layoutlayout,Stringtarget)Createsaconfiguredappender.

    MethodSummaryvoid

    activateOptions()Preparestheappenderforuse.

    protectedvoid

    closeWriter(){@inheritDoc}

    booleangetFollow()GetswhethertheappenderhonorsreassignmentsofSystem.outorSystem.errmadeafterconfiguration.

    StringgetTarget()ReturnsthecurrentvalueoftheTargetproperty.

    voidsetFollow(booleannewValue)SetswhethertheappenderhonorsreassignmentsofSystem.outorSystem.errmadeafterconfiguration.

    voidsetTarget(Stringvalue)SetsthevalueoftheTargetoption.

    Methodsinheritedfromclassorg.apache.log4j.WriterAppenderappend,checkEntryConditions,close,createWriter,getEncoding,getImmediateFlush,requiresLayout,reset,setEncoding,setErrorHandler,setImmediateFlush,setWriter,subAppend,writeFooter,writeHeader

    http://java.sun.com/j2se/1.3/docs/api/java/lang/String.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/String.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/String.html

  • Methodsinheritedfromclassorg.apache.log4j.AppenderSkeletonaddFilter,clearFilters,doAppend,finalize,getErrorHandler,getFilter,getFirstFilter,getLayout,getName,getThreshold,isAsSevereAsThreshold,setLayout,setName,setThreshold

    Methodsinheritedfromclassjava.lang.Objectclone,equals,getClass,hashCode,notify,notifyAll,toString,wait,wait,wait

    FieldDetail

    SYSTEM_OUT

    publicstaticfinalStringSYSTEM_OUT

    SYSTEM_ERR

    publicstaticfinalStringSYSTEM_ERR

    target

    protectedStringtarget

    ConstructorDetail

    ConsoleAppender

    publicConsoleAppender()

    Constructsanunconfiguredappender.

    ConsoleAppender

    http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#clone()http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#equals(java.lang.Object)http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#getClass()http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#hashCode()http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notify()http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notifyAll()http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#toString()http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait()http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait(long)http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait(long, int)http://java.sun.com/j2se/1.3/docs/api/java/lang/String.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/String.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/String.html

  • publicConsoleAppender(Layoutlayout)

    Createsaconfiguredappender.Parameters:

    layout-layout,maynotbenull.

    ConsoleAppender

    publicConsoleAppender(Layoutlayout,Stringtarget)

    Createsaconfiguredappender.Parameters:

    layout-layout,maynotbenull.target-target,either"System.err"or"System.out".

    MethodDetail

    setTarget

    publicvoidsetTarget(Stringvalue)

    SetsthevalueoftheTargetoption.Recognizedvaluesare"System.out"and"System.err".Anyothervaluewillbeignored.

    getTarget

    publicStringgetTarget()

    ReturnsthecurrentvalueoftheTargetproperty.Thedefaultvalueoftheoptionis"System.out".SeealsosetTarget(java.lang.String).

    setFollow

    publicfinalvoidsetFollow(booleannewValue)

    http://java.sun.com/j2se/1.3/docs/api/java/lang/String.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/String.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/String.html

  • SetswhethertheappenderhonorsreassignmentsofSystem.outorSystem.errmadeafterconfiguration.Parameters:

    newValue-iftrue,appenderwillusevalueofSystem.outorSystem.errinforceatthetimewhenloggingeventsareappended.

    Since:1.2.13

    getFollow

    publicfinalbooleangetFollow()

    GetswhethertheappenderhonorsreassignmentsofSystem.outorSystem.errmadeafterconfiguration.Returns:

    trueifappenderwillusevalueofSystem.outorSystem.errinforceatthetimewhenloggingeventsareappended.

    Since:1.2.13

    activateOptions

    publicvoidactivateOptions()

    Preparestheappenderforuse.Overrides:

    activateOptionsinclassWriterAppender

    closeWriter

    protectedfinalvoidcloseWriter()

    {@inheritDoc}Overrides:

    closeWriterinclassWriterAppender

  • Overview Package Class Use Tree Deprecated IndexHelp Log4j1.2.14PREVCLASSNEXTCLASS FRAMESNOFRAMES

    SUMMARY:INNER|FIELD|CONSTR|METHOD DETAIL:FIELD|CONSTR|METHOD

    Copyright2000-2005ApacheSoftwareFoundation.

  • Overview Package Class Use Tree Deprecated IndexHelp Log4j1.2.14PREVCLASSNEXTCLASS FRAMESNOFRAMES

    SUMMARY:INNER|FIELD|CONSTR|METHOD DETAIL:FIELD|CONSTR|METHOD

  • org.apache.log4jClassDailyRollingFileAppenderjava.lang.Object|+--org.apache.log4j.AppenderSkeleton|+--org.apache.log4j.WriterAppender|+--org.apache.log4j.FileAppender|+--org.apache.log4j.DailyRollingFileAppender

    AllImplementedInterfaces:Appender,OptionHandler

    publicclassDailyRollingFileAppenderextendsFileAppender

    DailyRollingFileAppenderextendsFileAppendersothattheunderlyingfileisrolledoveratauserchosenfrequency.

    TherollingscheduleisspecifiedbytheDatePatternoption.ThispatternshouldfollowtheSimpleDateFormatconventions.Inparticular,youmustescapeliteraltextwithinapairofsinglequotes.Aformattedversionofthedatepatternisusedasthesuffixfortherolledfilename.

    Forexample,iftheFileoptionissetto/foo/bar.logandtheDatePatternsetto'.'yyyy-MM-dd,on2001-02-16atmidnight,theloggingfile/foo/bar.logwillbecopiedto/foo/bar.log.2001-02-16andloggingfor2001-02-17willcontinuein/foo/bar.loguntilitrollsoverthenextday.

    Isispossibletospecifymonthly,weekly,half-daily,daily,hourly,orminutelyrolloverschedules.

    DatePattern Rolloverschedule Example

    Rolloveratthe

    AtmidnightofMay31st,2002/foo/bar.logwillbecopiedto

    http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/text/SimpleDateFormat.html

  • '.'yyyy-MM beginningofeachmonth

    /foo/bar.log.2002-05.LoggingforthemonthofJunewillbeoutputto/foo/bar.loguntilitisalsorolledoverthenextmonth.

    '.'yyyy-ww

    Rolloveratthefirstdayofeachweek.Thefirstdayoftheweekdependsonthelocale.

    AssumingthefirstdayoftheweekisSunday,onSaturdaymidnight,June9th2002,thefile/foo/bar.logwillbecopiedto/foo/bar.log.2002-23.Loggingforthe24thweekof2002willbeoutputto/foo/bar.loguntilitisrolledoverthenextweek.

    '.'yyyy-MM-dd

    Rolloveratmidnighteachday.

    Atmidnight,onMarch8th,2002,/foo/bar.logwillbecopiedto/foo/bar.log.2002-03-08.Loggingforthe9thdayofMarchwillbeoutputto/foo/bar.loguntilitisrolledoverthenextday.

    '.'yyyy-MM-dd-a

    Rolloveratmidnightandmiddayofeachday.

    Atnoon,onMarch9th,2002,/foo/bar.logwillbecopiedto/foo/bar.log.2002-03-09-AM.Loggingfortheafternoonofthe9thwillbeoutputto/foo/bar.loguntilitisrolledoveratmidnight.

    '.'yyyy-MM-dd-HH

    Rolloveratthetopofeveryhour.

    Atapproximately11:00.000o'clockonMarch9th,2002,/foo/bar.logwillbecopiedto/foo/bar.log.2002-03-09-10.Loggingforthe11thhourofthe9thofMarchwillbeoutputto/foo/bar.loguntilitisrolledoveratthebeginningofthenexthour.

    '.'yyyy-MM-dd-HH-mm

    Rolloveratthebeginningofeveryminute.

    Atapproximately11:23,000,onMarch9th,2001,/foo/bar.logwillbecopiedto/foo/bar.log.2001-03-09-10-22.Loggingfortheminuteof11:23(9thofMarch)willbeoutputto/foo/bar.loguntilitisrolledoverthenextminute.

    Donotusethecolon":"characterinanywhereintheDatePatternoption.

  • ThetextbeforethecolonisinterpetedastheprotocolspecificaionofaURLwhichisprobablynotwhatyouwant.

    Author:EirikLygre,CekiGülcü

    Fieldsinheritedfromclassorg.apache.log4j.FileAppenderbufferedIO,bufferSize,fileAppend,fileName

    Fieldsinheritedfromclassorg.apache.log4j.WriterAppenderencoding,immediateFlush,qw

    Fieldsinheritedfromclassorg.apache.log4j.AppenderSkeletonclosed,errorHandler,headFilter,layout,name,tailFilter,threshold

    ConstructorSummaryDailyRollingFileAppender()Thedefaultconstructordoesnothing.DailyRollingFileAppender(Layoutlayout,Stringfilename,StringdatePattern)InstantiateaDailyRollingFileAppenderandopenthefiledesignatedbyfilename.

    MethodSummary

    void

    activateOptions()IfthevalueofFileisnotnull,thenFileAppender.setFile(java.lang.String)iscalledwiththevaluesofFileandAppendproperties.

    StringgetDatePattern()ReturnsthevalueoftheDatePatternoption.

    voidsetDatePattern(Stringpattern)TheDatePatterntakesastringinthesameformatasexpectedbySimpleDateFormat.

    http://java.sun.com/j2se/1.3/docs/api/java/lang/String.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/String.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/String.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/String.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/text/SimpleDateFormat.html

  • protectedvoid

    subAppend(LoggingEventevent)ThismethoddifferentiatesDailyRollingFileAppenderfromitssuperclass.

    Methodsinheritedfromclassorg.apache.log4j.FileAppendercloseFile,getAppend,getBufferedIO,getBufferSize,getFile,reset,setAppend,setBufferedIO,setBufferSize,setFile,setFile,setQWForFiles

    Methodsinheritedfromclassorg.apache.log4j.WriterAppenderappend,checkEntryConditions,close,closeWriter,createWriter,getEncoding,getImmediateFlush,requiresLayout,setEncoding,setErrorHandler,setImmediateFlush,setWriter,writeFooter,writeHeader

    Methodsinheritedfromclassorg.apache.log4j.AppenderSkeletonaddFilter,clearFilters,doAppend,finalize,getErrorHandler,getFilter,getFirstFilter,getLayout,getName,getThreshold,isAsSevereAsThreshold,setLayout,setName,setThreshold

    Methodsinheritedfromclassjava.lang.Objectclone,equals,getClass,hashCode,notify,notifyAll,toString,wait,wait,wait

    ConstructorDetail

    DailyRollingFileAppender

    publicDailyRollingFileAppender()

    Thedefaultconstructordoesnothing.

    DailyRollingFileAppender

    publicDailyRollingFileAppender(Layoutlayout,

    http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.htmlhttp://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#clone()http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#equals(java.lang.Object)http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#getClass()http://java.sun.com/j2se/1.3/docs/api/ja


Recommended