Jelix 1.8.13

jLog
in package

utility class to log some message into a file into yourapp/var/log.

Tags
subpackage

core_log

static

Table of Contents

$allMessages  : array<string|int, jILogMessage>
all messages, when the memory logger is used.
$loggers  : array<string|int, jILogger>
$messagesCount  : mixed
messages count of each categories, for the memory logger.
dump()  : mixed
log a dump of a php value (object or else) into the given category.
getMessages()  : array<string|int, jILogMessage>
returns messages stored in memory (if the memory logger is activated).
getMessagesCount()  : int
isPluginActivated()  : bool
indicate if, for the given category, the given logger is activated.
log()  : mixed
log a message into the given category.
logEx()  : mixed
log an exception into the given category.
outputLog()  : mixed
call each loggers so they have the possibility to inject data into the given response.
_dispatchLog()  : mixed
_log()  : mixed
__construct()  : mixed
private constructor. static class.

Properties

$allMessages

all messages, when the memory logger is used.

protected static array<string|int, jILogMessage> $allMessages = array()
Tags

$messagesCount

messages count of each categories, for the memory logger.

protected static mixed $messagesCount = array()
Tags

Methods

dump()

log a dump of a php value (object or else) into the given category.

public static dump(mixed $obj[, string $label = '' ][, string $category = 'default' ]) : mixed
Parameters
$obj : mixed

the value to dump

$label : string = ''

a label

$category : string = 'default'

the message category

Tags
Return values
mixed

getMessages()

returns messages stored in memory (if the memory logger is activated).

public static getMessages([array<string|int, mixed>|string $filter = false ]) : array<string|int, jILogMessage>
Parameters
$filter : array<string|int, mixed>|string = false

if given, category or list of categories of messages you want to retrieve

Tags
Return values
array<string|int, jILogMessage>

getMessagesCount()

public static getMessagesCount(mixed $category) : int
Parameters
$category : mixed
Tags
Return values
int

isPluginActivated()

indicate if, for the given category, the given logger is activated.

public static isPluginActivated(string $logger, string $category) : bool
Parameters
$logger : string

the logger name

$category : string

the category

Tags
Return values
bool

true if it is activated

log()

log a message into the given category.

public static log(mixed $message[, string $category = 'default' ]) : mixed

Warning: since it is called by error handler, it should not trigger errors! and should take care of case were an error could appear.

Parameters
$message : mixed
$category : string = 'default'

the log type

Tags
Return values
mixed

logEx()

log an exception into the given category.

public static logEx(Exception $exception[, string $category = 'default' ]) : mixed
Parameters
$exception : Exception
$category : string = 'default'

the log type

Tags
Return values
mixed

outputLog()

call each loggers so they have the possibility to inject data into the given response.

public static outputLog(jResponse $response) : mixed
Parameters
$response : jResponse
Tags
Return values
mixed

_log()

protected static _log(jILogMessage $message, array<string|int, mixed> $loggers) : mixed
Parameters
$message : jILogMessage
$loggers : array<string|int, mixed>
Tags
Return values
mixed

__construct()

private constructor. static class.

private __construct() : mixed
Tags
Return values
mixed

Search results