Log

Provides logging capabilities to the HotMelt framework.

todo

Replace/supplement this with a PSR-3-compatible logger interface (http://www.php-fig.org/psr/psr-3/).

Methods

Update the effective logging level.

setLevel(int $level) 
static

Arguments

$level

int

The logging level to set. Any of the \HotMelt\Log::LEVEL_... constants.

Return the effective logging level.

getLevel() : int
static

Response

int

Write a message to the log.

write(int $level, string $message) 
static

Arguments

$level

int

The logging level for the message to write. Will not write the message, if the logging level is above the effective logging level.

$message

string

The message to write.

Writes a message with a level of `LEVEL_ERROR` to the log.

error(string $message) 
static

Arguments

$message

string

The message to write.

Writes a message with a level of `LEVEL_WARNING` to the log.

warning(string $message) 
static

Arguments

$message

string

The message to write.

Writes a message with a level of `LEVEL_INFO` to the log.

info(string $message) 
static

Arguments

$message

string

The message to write.

Constants

When the logging level is set to this value via `\HotMelt\Log::setLevel()`, no messages will be logged.

LEVEL_NONE

Logging level identifying runtime errors.

LEVEL_ERROR

Logging level identifying exceptional occurrences that are not errors.

LEVEL_WARNING

Logging level identifying normal but interesting events.

LEVEL_INFO