Installation guide

Sms4Domino Help
- 113 -
File Appender settings
File Appender settingsFile Appender settings
File Appender settings
File appenders are used to route all logging information to one or more files.
FileAppender appends log events into a file. The file is specified by the File option . If the
file already exists, it is either appended or truncated depending on the value of the
Append parameter.
RollingFileAppender acts as a FileAppender but will create a new file when the log file
reaches a certain size specified by the MaxFileSize parameter . When creating a new file
the current log file is renamed by appending a .1 to the filename. Should this .1 file
already exist it is renamed by changing the .1 to .2. The maximum number of files to keep
is specified by the MaxBackupIndex parameter.
DailyRollingFileAppender acts as a FileAppender but will create a new file at a user
chosen interval. The file names will contain the date information.
A typical configuration file for using a FileAppender (assuming the appender is called file1 as
defined by
log4
j
.rootLogger=INFO, console1, file1
)
log4
j
.appender.file1=org.apache.log4
j
.FileAppender
#use \\ or / as directory separator when specifying the file name
log4
j
.appender.file1.File=e:\\folder\\example.log
# Append parameter: if true the logger will append to the file should it already exist
log4
j
.appender.file1.Append=true
A typical configuration file for using a RollingFileAppender (assuming the appender is called file1
as defined by
log4
j
.rootLogger=INFO, console1, file1
)
log4
j
.appender.file1=org.apache.log4
j
.RollingFileAppender
#use \\ or / as directory separator when specifying the file name
log4
j
.appender.file1.File=e:\\folder\\example.log
# Append parameter: if true the logger will append to the file should it already exist
log4
j
.appender.file1.Append=true
# The MaxBackupIndex option determines the number of previously rolled files to preserve .
# If set to zero, then no roll over occurs and the log file is simply truncated when it reaches
MaxFileSize.
log4
j
.appender.file1.MaxBackupIndex=5
# The MaxFileSize option takes a String value representing a long integer in the range 0 -
263. You can specify the value with the suffixes "KB", "MB" or "GB" so that the integer is
interpreted as being
# expressed respectively in kilobytes, megabytes or gigabytes.
# Rollover occurs when the log file reaches MaxFile-Size. One log event will always be
contained within one file
log4
j
.appender.file1.MaxFileSize=100MB
A typical configuration file for using a DailyRollingFileAppender (assuming the appender is called
file1 as defined by
log4
j
.rootLogger=INFO, console1, file1
)
log4
j
.appender.file1=org.apache.log4
j
.RollingFileAppender
#use \\ or / as directory separator when specifying the file name
log4
j
.appender.file1.File=e:\\folder\\example.log
# Append parameter: if true the logger will append to the file should it already exist
log4
j
.appender.file1.Append=true
# The DatePattern specifies when the rollover should occur. The parameter should follow the
conventions of the java.text.SimpleDateFormat class
# yyyy for yearly rollover
# yyyy-MM for monthly rollover
# yyyy-MM-dd for daily rollover
# yyyy-MM-dd-a for daily rollover at midnight and midday
# yyyy-MM-dd-HH for hourly rollover
# The pattern is used to specify when the rollover should occur and what suffix should be