Skip to content

Releases: alpha6/Log-Mini

Release list

0.5.1

Choose a tag to compare

@alpha6 alpha6 released this 17 Sep 19:27

Updated synopsis

0.5.0

Choose a tag to compare

@alpha6 alpha6 released this 14 Sep 18:35
  • Allow logrotate even an app doesn't care about HUP signal or similar. Now you can just remove the log file and logger will recreate it as soon as log something
  • Allow logging with context.
    push_context('context text') - add to context
    pop_context() - removes last element from context
    clear_context() - removes all elements from context

Example:

$log->push_context('request_id=12345');
$log->error('some error');

will produce:

2024-08-14 20:58:08.744 [error] request_id=12345: some error