Group
Extension

Matches 1

Log-Defer ( F/FR/FRACTAL/Log-Defer-0.312.tar.gz, FRACTAL, 2016; MetaCPAN )
Log-Defer/lib/Log/Defer.pm ( view source; MetaCPAN )
   use Log::Defer;
    use JSON::XS; ## or whatever
    use Try::Tiny;

    sub my_logger_function {
      my $msg = shift;
      
      my $encoded_msg = try {
        JSON::XS->new->pretty(1)->encod
e($msg)
      }
      catch {
        "Failed to JSON encode msg : $_"
      };

      print $encoded_msg; ## usually you'd append this to a file
    }

    my $logger = Log::Defer->new({
            
isualisation tool L<log-defer-viz> only support JSON at this time.

The currently recommended format to store logs in is newline-separated, minified JSON. The newline+minification is useful because it

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.