Documentation

Logger extends AbstractLogger

Table of Contents

$levels  : array<string|int, mixed>
Array of conversion levels.
$s_levels  : array<string|int, mixed>
Array of conversion levels in reverse order.
$file  : array<string|int, mixed>
Store the logs.
$log  : array<string|int, mixed>
Store the logs.
alert()  : void
Action must be taken immediately.
critical()  : void
Critical conditions.
debug()  : void
Detailed debug information.
emergency()  : void
System is unusable.
error()  : void
Runtime errors that do not require immediate action but should typically.
get()  : array<string|int, mixed>
Get the log message.
info()  : void
Interesting events.
interpolate()  : void
Interpolate string with parameters.
log()  : void
Log.
logException()  : void
Log an Exception.
notice()  : void
Normal but significant events.
setCustomFile()  : object
Set the custom file.
store()  : array<string|int, mixed>
Store the log.
warning()  : void
Exceptional occurrences that are not errors.
writer()  : void
Write the log message in files.

Properties

$levels

Array of conversion levels.

protected array<string|int, mixed> $levels = ['emergency' => 0, 'alert' => 1, 'critical' => 2, 'error' => 3, 'warning' => 4, 'notice' => 5, 'info' => 6, 'debug' => 7]
Tags
since
1.0.0

$s_levels

Array of conversion levels in reverse order.

protected array<string|int, mixed> $s_levels = [0 => 'emergency', 1 => 'alert', 2 => 'critical', 3 => 'error', 4 => 'warning', 5 => 'notice', 6 => 'info', 7 => 'debug']
Tags
since
1.0.0

$file

Store the logs.

private array<string|int, mixed> $file
Tags
since
1.0.0

$log

Store the logs.

private array<string|int, mixed> $log
Tags
since
1.0.0

Methods

alert()

Action must be taken immediately.

public alert((string) $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
$message : (string)

(array) $context

$context : array<string|int, mixed> = []
Tags
since
1.0.0
Return values
void

critical()

Critical conditions.

public critical((string) $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
$message : (string)

(array) $context

$context : array<string|int, mixed> = []
Tags
since
1.0.0
Return values
void

debug()

Detailed debug information.

public debug((string) $message[, (array) $context = [] ]) : void
Parameters
$message : (string)
$context : (array) = []
Tags
since
1.0.0
Return values
void

emergency()

System is unusable.

public emergency((string) $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
$message : (string)

(array) $context

$context : array<string|int, mixed> = []
Tags
since
1.0.0
Return values
void

error()

Runtime errors that do not require immediate action but should typically.

public error((string) $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
$message : (string)

(array) $context

$context : array<string|int, mixed> = []
Tags
since
1.0.0
Return values
void

get()

Get the log message.

public get() : array<string|int, mixed>
Tags
since
1.0.0
Return values
array<string|int, mixed>

info()

Interesting events.

public info((string) $message[, (array) $context = [] ]) : void
Parameters
$message : (string)
$context : (array) = []
Tags
since
1.0.0
Return values
void

interpolate()

Interpolate string with parameters.

public interpolate((string) $string, (array) $params, (string) $level) : void
Parameters
$string : (string)

String with parameters

$params : (array)

Parameter arrays

$level : (string)

Level of log

Tags
since
1.0.0
Return values
void

log()

Log.

public log((string) $level, (string) $message[, (array) $context = [] ]) : void
Parameters
$level : (string)

Error level (string or PHP syslog priority)

$message : (string)

Error message

$context : (array) = []

Contextual array

Tags
since
1.0.0
Return values
void

logException()

Log an Exception.

public logException((string) $level, mixed $message[, (array) $context = [] ][, (\alphaz\Common\Logger\Exception) $exception = null ]) : void
Parameters
$level : (string)

Error level (string or PHP syslog priority)

$message : mixed
$context : (array) = []

Contextual array

$exception : (\alphaz\Common\Logger\Exception) = null

Exception

Tags
oaram

(string) $message Error message

since
1.0.0
Return values
void

notice()

Normal but significant events.

public notice((string) $message[, (array) $context = [] ]) : void
Parameters
$message : (string)
$context : (array) = []
Tags
since
1.0.0
Return values
void

setCustomFile()

Set the custom file.

public setCustomFile((string) $name) : object
Parameters
$name : (string)

valid name of file if file not exists it create for you.

Tags
since
1.0.0
Return values
object

store()

Store the log.

public store((array) $log) : array<string|int, mixed>
Parameters
$log : (array)
Tags
since
1.0.0
Return values
array<string|int, mixed>

warning()

Exceptional occurrences that are not errors.

public warning((string) $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
$message : (string)

(array) $context

$context : array<string|int, mixed> = []
Tags
since
1.0.0
Return values
void

writer()

Write the log message in files.

public writer(mixed $level, (string) $message) : void
Parameters
$level : mixed
$message : (string)

Error message

Tags
since
1.0.0
Return values
void

Search results