FacturaScripts

MiniLog

Manage all log message information types.

Table of Contents

DEFAULT_CHANNEL 'master'
LIMIT 5000
$channel Current channel. string
$context array
$data Contains the log data. array
$storage MiniLogStorageInterface
$translator Translator|null
__construct() mixed
clear() Clears all data for one or all channels. mixed
critical() Critical conditions. mixed
debug() Detailed debug information. mixed
error() Runtime errors that do not require immediate action but should typically be logged and monitored. mixed
getContext() Gets the stored context value for a given key. string
info() Interesting information, advices. mixed
notice() Normal but significant events. mixed
read() Returns all messages for a given channel (or all channels) and some levels. array
save() Stores all messages on the default storage. bool
setContext() Sets the context value for a given key. mixed
setStorage() Sets a new storage. mixed
warning() Exceptional occurrences that are not errors. mixed
log() Logs with an arbitrary level. mixed
reduce() Saves on the default storage and clear all data. mixed

Constants

DEFAULT_CHANNEL

mixed $DEFAULT_CHANNEL = 'master'

Properties

$channel

Current channel.

private string $channel

$context

private static array $context = []

$data

Contains the log data.

private static array $data = []

Methods

__construct()

public __construct( [ $channel : string = '' ] [, $translator : mixed = null ] ) : mixed
Parameters
$channel : string = ''
$translator : mixed = null
Return values
mixed

clear()

Clears all data for one or all channels.

public static clear( [ $channel : string = '' ] ) : mixed
Parameters
$channel : string = ''
Return values
mixed

critical()

Critical conditions.

public critical( $message : string [, $context : array = [] ] ) : mixed

Example: Application component unavailable, unexpected exception.

Parameters
$message : string
$context : array = []
Return values
mixed

debug()

Detailed debug information.

public debug( $message : string [, $context : array = [] ] ) : mixed
Parameters
$message : string
$context : array = []
Return values
mixed

error()

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

public error( $message : string [, $context : array = [] ] ) : mixed
Parameters
$message : string
$context : array = []
Return values
mixed

getContext()

Gets the stored context value for a given key.

public static getContext( $key : string ) : string
Parameters
$key : string
Return values
string

info()

Interesting information, advices.

public info( $message : string [, $context : array = [] ] ) : mixed
Parameters
$message : string
$context : array = []
Return values
mixed

notice()

Normal but significant events.

public notice( $message : string [, $context : array = [] ] ) : mixed
Parameters
$message : string
$context : array = []
Return values
mixed

read()

Returns all messages for a given channel (or all channels) and some levels.

public static read( [ $channel : string = '' ] [, $levels : array = [] ] ) : array
Parameters
$channel : string = ''
$levels : array = []
Return values
array

save()

Stores all messages on the default storage.

public static save( [ $channel : string = '' ] ) : bool
Parameters
$channel : string = ''
Return values
bool

setContext()

Sets the context value for a given key.

public static setContext( $key : string , $value : string ) : mixed
Parameters
$key : string
$value : string
Return values
mixed

warning()

Exceptional occurrences that are not errors.

public warning( $message : string [, $context : array = [] ] ) : mixed

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

Parameters
$message : string
$context : array = []
Return values
mixed

log()

Logs with an arbitrary level.

private log( $level : string , $message : string [, $context : array = [] ] ) : mixed
Parameters
$level : string
$message : string
$context : array = []
Return values
mixed

reduce()

Saves on the default storage and clear all data.

protected reduce( ) : mixed
Return values
mixed

Search results