\Log

Logs messages

Summary

Methods
Properties
Constants
log_level()
debug()
error()
No public properties found
MSG_ERROR
MSG_DEBUG
do_write()
$log_level
$today
N/A
No private methods found
No private properties found
N/A

Constants

MSG_ERROR

MSG_ERROR

Identifier for error messages

MSG_DEBUG

MSG_DEBUG

Identifier for debug messages

Properties

$log_level

$log_level : string

The logging level

Type

string

$today

$today : string

Today's date

Type

string

Methods

log_level()

log_level(string|null  $level = null) : boolean|string

Gets or sets the log level. If no parameter is passed, returns self::$log_level, if it's set and has a valid value, sets it and returns TRUE;

Parameters

string|null $level

The logging level

Returns

boolean|string

debug()

debug(string  $msg, array  $trace = null) : string

Logs a debug level message

Parameters

string $msg

The message

array $trace

optionally, supply the debug trace

Returns

string —

The message you passed on

error()

error(string  $msg, array  $trace = null) : string

Logs a error level message

Parameters

string $msg

The message

array $trace

optionally, supply the debug trace

Returns

string —

The message you passed on

do_write()

do_write(string  $msg, string  $level, array  $trace = null) : boolean

Performs the write operation

Parameters

string $msg

The message to log

string $level

The level of the message

array $trace

optionally, supply the debug trace

Returns

boolean