log\Logger flush()

flush() public method Flushes log messages from memory to targets. public void flush ( $final = false )$final boolean Whether this is a final call during a request.

log\Logger $profiling

$profiling public read-only property The profiling results. Each element is an array consisting of these elements: info, category, timestamp, trace, level, duration. public array getProfiling ( $categories = [], $excludeCategories = [] )

log\Logger calculateTimings()

calculateTimings() public method Calculates the elapsed time for the given log messages. public array calculateTimings ( $messages )$messages array The log messages obtained from profiling return array Timings. Each element is an array consisting of these elements: info, category, timestamp, trace, level, duration.

log\Logger $messages

$messages public property Logged messages. This property is managed by log() and flush(). Each log message is of the following structure: [ [0] => message (mixed, can be a string or some complex data, such as an exception object) [1] => level (integer) [2] => category (string) [3] => timestamp (float, obtained by microtime(true)) [4] => traces (array, debug backtrace, contains the application code call stacks) ] public array $messages = []

log\Logger $elapsedTime

$elapsedTime public read-only property The total elapsed time in seconds for current request. public float getElapsedTime ( )

log\Logger $dispatcher

$dispatcher public property The message dispatcher public yii\log\Dispatcher $dispatcher = null

log\Logger $dbProfiling

$dbProfiling public read-only property The first element indicates the number of SQL statements executed, and the second element the total time spent in SQL execution. public array getDbProfiling ( )

log\Logger $flushInterval

$flushInterval public property How many messages should be logged before they are flushed from memory and sent to targets. Defaults to 1000, meaning the flush() method will be invoked once every 1000 messages logged. Set this property to be 0 if you don't want to flush messages until the application terminates. This property mainly affects how much memory will be taken by the logged messages. A smaller value means less memory, but will increase the execution time due to the overhead of flus

log\FileTarget init()

init() public method Initializes the route. This method is invoked after the route is created by the route manager. public void init ( )

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