Simple php logging class.
PHP
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
MIT-LICENSE
readme.rdoc

readme.rdoc

Logger

A simple PHP logger class for logging out to a specified file.

Log levels can be one of the following:

INFO
DEBUG
WARN
ERROR
FATAL

Output is only written to file if the log level is within the scope of the level specified when instantiating the logger (e.g. a info call would not be written if the log level was set to WARN).

Usage

$logger = new Logger("development.log", Logger::INFO);

# would create a new log file at /path/to/logger/script/log/development.log

$logger->info("Why hello there Ted");

# writes "Why hello there Ted" to development.log