Class Misago\Logger

Constants

Public instance attributes

Methods

Public static methods

singleton()

Public instance methods

__construct()

__destruct()

add($severity, $message)

Logs a message.

add_log_device($device, $level=null)

Adds a file handler or file to write to. You may filter severity per device too. You may, for instance, want to log all messages to a log file, while outputting only notices, warnings and errors to STDERR.

$logger->add_log_device('log/development.log');
$logger->add_log_device(STDERR, Logger::WARN); 

debug($message)

Logs a debug message.

error($message)

Logs an error.

flush()

Manually flushes messages on log devices.

info($message)

logs an information message.

log_debug()

log_error()

log_info()

log_notice()

log_warning()

notice($message)

logs a notice.

unknown($message)

Logs an unknown error. Unknown errors will always be logged.

warn($message)

Logs a warning.

Protected instance methods

format_message($severity, $message)