Class LoggerAppenderDailyFile
An Appender that automatically creates a new logfile each day.
The file is rolled over once a day. That means, for each day a new file is created. A formatted version of the date pattern is used as to create the file name using the PHP_MANUAL#sprintf function.
This appender uses a layout.
Configurable parameters:
- datePattern - Format for the date in the file path, follows formatting rules used by the PHP date() function. Default value: "Ymd".
- file - Path to the target file. Should contain a %s which gets substituted by the date.
- append - If set to true, the appender will append to the file, otherwise the file contents will be overwritten. Defaults to true.
- LoggerConfigurable
- LoggerAppender
- LoggerAppenderFile
- LoggerAppenderDailyFile
Package: log4php\appenders
License: Apache License, Version 2.0
Version: $Revision: 1382274 $
Link: Appender documentation
Located at appenders/LoggerAppenderDailyFile.php
License: Apache License, Version 2.0
Version: $Revision: 1382274 $
Link: Appender documentation
Located at appenders/LoggerAppenderDailyFile.php
public
|
|
public
|
|
protected
|
|
protected
|
|
public
|
|
public
string
|
close(),
getAppend(),
getFile(),
openFile(),
setAppend(),
setFile(),
write(),
writeWithLocking(),
writeWithoutLocking()
|
setBoolean(),
setFileSize(),
setInteger(),
setLevel(),
setNumeric(),
setPositiveInteger(),
setString()
|
protected
string
|
$datePattern | "Ymd" |
#
The 'datePattern' parameter. Determines how date will be formatted in file name. |
protected
string
|
$currentDate |
|
#
Current date which was used when opening a file. Used to determine if a rollover is needed when the date changes. |
$append,
$file,
$fp,
$locking
|
$closed,
$filter,
$layout,
$name,
$requiresLayout,
$threshold
|