Constants

DEFAULT_LEVEL

DEFAULT_LEVEL = "E_ERROR_WARNING" : string

DEFAULT_FORMAT

DEFAULT_FORMAT = "[ %DATE% %TIME% ] [ %LEVEL% ] [ %SOURCE% ] ~ %MESSAGE%" : string

Properties

$reverseLevel

$reverseLevel : array

Reverse int level to string

Type

array

$levelToString

$levelToString : array

Level to string for message

Type

array

$logger

$logger : \donbidon\Lib\FileSystem\Logger

Logger instance

Type

\donbidon\Lib\FileSystem\Logger

Methods

handler()

handler(string  $name, \donbidon\Core\Event\Args  $args) : void

Logging handler.

Parameters

string $name
\donbidon\Core\Event\Args $args

onUpdateRegistry()

onUpdateRegistry(string  $name, \donbidon\Core\Event\Args  $args) : void

Updating method registry handler.

$evtManager->fire(':updateLogRegistry:', new Args([
    'conditions' => [
        'name'   => "File",
        'level'  => "E_ALL",
    ],
    'changes' => [
        'path' => $path,
    ],
]));

Parameters

string $name
\donbidon\Core\Event\Args $args

checkSource()

checkSource(string  $source) : boolean

Returns true if passed source published in config file.

Parameters

string $source

Returns

boolean

checkLevel()

checkLevel(integer  $level) : boolean

Returns true if passed level published in config file.

Parameters

integer $level

Throws

\RuntimeException

If invalid level passed.

Returns

boolean

handlerToString()

handlerToString(callable  $handler, string  $name = '') : string

Returns stringified event handler.

Parameters

callable $handler
string $name

Returns

string

render()

render(\donbidon\Core\Event\Args  $args) : string

Renders message according ro format.

Parameters

\donbidon\Core\Event\Args $args

Returns

string