Documentation

LogLevels
in package

A list of log levels to be recognized.

Tags
category

Horde

author

Ralf Lang lang@b1-systems.de

license

http://www.horde.org/licenses/bsd BSD

Table of Contents

$levels  : array<string|int, mixed>
The configured levels.
__construct()  : mixed
Constructor.
getByCriticality()  : LogLevel
Get a registered log level by criticality.
getByLevelName()  : LogLevel
Get a registered log level by name or throw an exception.
initWithAliasLevels()  : self
Register the canonical log levels and their popular aliases.
initWithCanonicalLevels()  : self
register()  : void

Properties

$levels

The configured levels.

private array<string|int, mixed> $levels = []

Methods

__construct()

Constructor.

public __construct([array<string|int, LogLevel$levels = [] ]) : mixed
Parameters
$levels : array<string|int, LogLevel> = []

Setup with these levels. Circumvents any sanity checks of register

Return values
mixed

getByCriticality()

Get a registered log level by criticality.

public getByCriticality(int $criticality) : LogLevel

First match wins. No match throws exception.

Parameters
$criticality : int
Tags
throws
InvalidArgumentException
Return values
LogLevel

getByLevelName()

Get a registered log level by name or throw an exception.

public getByLevelName(string $name) : LogLevel

Matching is case insensitive. No Match throws exception;

Parameters
$name : string
Tags
throws
InvalidArgumentException
Return values
LogLevel

initWithAliasLevels()

Register the canonical log levels and their popular aliases.

public static initWithAliasLevels() : self
Return values
self

initWithCanonicalLevels()

public static initWithCanonicalLevels() : self
Return values
self

Search results