log\FileTarget export()

export() public method Writes log messages to a file. public void export ( )throws yii\base\InvalidConfigException if unable to open the log file for writing

log\FileTarget $rotateByCopy

$rotateByCopy public property Whether to rotate log files by copy and truncate in contrast to rotation by renaming files. Defaults to true to be more compatible with log tailers and is windows systems which do not play well with rename on open files. Rotation by renaming however is a bit faster. The problem with windows systems where the rename() function does not work with files that are opened by some process is described in a comment by Martin Pelletier in the PHP documentation. By setti

log\FileTarget $maxLogFiles

$maxLogFiles public property Number of log files used for rotation. Defaults to 5. public integer $maxLogFiles = 5

log\FileTarget $maxFileSize

$maxFileSize public property Maximum log file size, in kilo-bytes. Defaults to 10240, meaning 10MB. public integer $maxFileSize = 10240

log\FileTarget $logFile

$logFile public property Log file path or path alias. If not set, it will use the "@runtime/logs/app.log" file. The directory containing the log files will be automatically created if not existing. public string $logFile = null

log\FileTarget $fileMode

$fileMode public property The permission to be set for newly created log files. This value will be used by PHP chmod() function. No umask will be applied. If not set, the permission will be determined by the current environment. public integer $fileMode = null

log\FileTarget $enableRotation

$enableRotation public property (available since version 2.0.3) Whether log files should be rotated when they reach a certain maximum size. Log rotation is enabled by default. This property allows you to disable it, when you have configured an external tools for log rotation on your server. public boolean $enableRotation = true

log\FileTarget $dirMode

$dirMode public property The permission to be set for newly created directories. This value will be used by PHP chmod() function. No umask will be applied. Defaults to 0775, meaning the directory is read-writable by owner and group, but read-only for other users. public integer $dirMode = 509

log\EmailTarget init()

init() public method Initializes the object. This method is invoked at the end of the constructor after the object is initialized with the given configuration. public void init ( )

log\EmailTarget export()

export() public method Sends log messages to specified email addresses. public void export ( )