PHP Class ManaPHP\Logger

Inheritance: extends Component, implements manaphp\LoggerInterface
Show file Open project: manaphp/manaphp

Public Properties

Property Type Description
$adapter ManaPHP\Logger\AdapterInterface

Protected Properties

Property Type Description
$_level string
$_s2i array

Public Methods

Method Description
__construct ( string | array | ManaPHP\Logger\AdapterInterface $options = [] ) Logger constructor.
debug ( string $message, array $context = [] ) : static Sends/Writes a debug message to the log
error ( string $message, array $context = [] ) : static Sends/Writes an error message to the log
fatal ( string $message, array $context = [] ) : static Sends/Writes a critical message to the log
getLevel ( ) : string Returns the current log level
getLevels ( ) : array
info ( string $message, array $context = [] ) : static Sends/Writes an info message to the log
log ( string $level, string $message, array $context ) : static
setDependencyInjector ( ManaPHP\DiInterface $dependencyInjector ) : static
setLevel ( string $level ) : static Filters the logs sent to the handlers to be greater or equals than a specific level
warning ( string $message, array $context = [] ) : static Sends/Writes a warning message to the log

Method Details

__construct() public method

Logger constructor.
public __construct ( string | array | ManaPHP\Logger\AdapterInterface $options = [] )
$options string | array | ManaPHP\Logger\AdapterInterface

debug() public method

Sends/Writes a debug message to the log
public debug ( string $message, array $context = [] ) : static
$message string
$context array
return static

error() public method

Sends/Writes an error message to the log
public error ( string $message, array $context = [] ) : static
$message string
$context array
return static

fatal() public method

Sends/Writes a critical message to the log
public fatal ( string $message, array $context = [] ) : static
$message string
$context array
return static

getLevel() public method

Returns the current log level
public getLevel ( ) : string
return string

getLevels() public method

public getLevels ( ) : array
return array

info() public method

Sends/Writes an info message to the log
public info ( string $message, array $context = [] ) : static
$message string
$context array
return static

log() public method

public log ( string $level, string $message, array $context ) : static
$level string
$message string
$context array
return static

setDependencyInjector() public method

public setDependencyInjector ( ManaPHP\DiInterface $dependencyInjector ) : static
$dependencyInjector ManaPHP\DiInterface
return static

setLevel() public method

Filters the logs sent to the handlers to be greater or equals than a specific level
public setLevel ( string $level ) : static
$level string
return static

warning() public method

Sends/Writes a warning message to the log
public warning ( string $message, array $context = [] ) : static
$message string
$context array
return static

Property Details

$_level protected property

protected string $_level
return string

$_s2i protected property

protected array $_s2i
return array

$adapter public property

public AdapterInterface,ManaPHP\Logger $adapter
return ManaPHP\Logger\AdapterInterface