Jelix 1.6.37

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()

$messagesCount

messages count of each categories, for the memory logger

protected static mixed $messagesCount = array()

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

Return values
mixed

getMessages()

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

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

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

Return values
array<string|int, jILogMessage>

getMessagesCount()

public static getMessagesCount(mixed $category) : int
Parameters
$category : mixed
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

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

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

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
Return values
mixed

_log()

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

__construct()

private constructor. static class

private __construct() : mixed
Return values
mixed

Search results