Skip to content

A logger that runs in HHVM. (Partially follows PSR-3 standard)

Notifications You must be signed in to change notification settings

legol/hhvm-logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

I'm surprised to realize that there is NO logger available for HHVM! So I made this very simple (yet sufficient) one.

Usage:

Option 1: You can define a class similar to \Log\MainLogger. Set up log file in the class. Then use it like this:

\Log\MainLogger::log(\Log\LogLevel::DEBUG, \HH\Lib\Str\format(
"web_controller=%s query_string=%s",
$responder,
    json_encode($query_string),
));

Option 2:

\$logger = new \Log\Logger('main');

\$logger->addHandler(new \Log\LogToFileHandler(
'/path/to/your/logging/file.log',
));

\$logger->log(\Log\LogLevel::WARNING, 'test log content');

About

A logger that runs in HHVM. (Partially follows PSR-3 standard)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages