Documentation

Logger
in package
implements LoggerInterface

Interfaces, Classes and Traits

LoggerInterface
Describes a logger instance.

Table of Contents

$logs  : mixed
__construct()  : mixed
alert()  : void
Action must be taken immediately.
clear()  : mixed
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 be logged and monitored.
getLogs()  : array<string|int, mixed>
info()  : void
Interesting events.
log()  : void
Logs with an arbitrary level.
notice()  : void
Normal but significant events.
warning()  : void
Exceptional occurrences that are not errors.

Properties

Methods

__construct()

public __construct() : mixed
Return values
mixed

alert()

Action must be taken immediately.

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

Example: Entire website down, database unavailable, etc. This should trigger the SMS alerts and wake you up.

Parameters
$message : mixed
$context : array<string|int, mixed> = []
Return values
void

clear()

public clear() : mixed
Return values
mixed

critical()

Critical conditions.

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

Example: Application component unavailable, unexpected exception.

Parameters
$message : mixed
$context : array<string|int, mixed> = []
Return values
void

debug()

Detailed debug information.

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

emergency()

System is unusable.

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

error()

Runtime errors that do not require immediate action but should typically be logged and monitored.

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

getLogs()

public getLogs([mixed $level = false ]) : array<string|int, mixed>
Parameters
$level : mixed = false
Return values
array<string|int, mixed>

info()

Interesting events.

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

Example: User logs in, SQL logs.

Parameters
$message : mixed
$context : array<string|int, mixed> = []
Return values
void

log()

Logs with an arbitrary level.

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

notice()

Normal but significant events.

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

warning()

Exceptional occurrences that are not errors.

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

Example: Use of deprecated APIs, poor use of an API, undesirable things that are not necessarily wrong.

Parameters
$message : mixed
$context : array<string|int, mixed> = []
Return values
void

Search results