Description of File Appeder class: org.apache.log4j.FileAppender

Overview

File Appender JavaDoc

FileAppender appends log events to a file.

Parameters

  • * 'File'* - The full path to the log file
  • * 'Append'* - 'true' to append the file, 'false' to truncate the file.

Nested Elements

  • * 'layout'*

XML Example Configuration

    <appender name="util" class="org.apache.log4j.FileAppender">
        <param name="File" value="/tmp/util.log" />
        <param name="Append" value="true" />
        <layout class="org.apache.log4j.PatternLayout">
          <param name="ConversionPattern" value="%t %-5p %c{2} - %m%n"/>
        </layout>	    
     </appender>

Log4jXmlFormat

  • No labels