The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Exception::Reporter::Sender::Dir - a report sender that writes to directories on the filesystem

VERSION

version 0.015

SYNOPSIS

  my $sender = Exception::Reporter::Sender::Dir->new({
    root => '/var/error/my-app',
  });

OVERVIEW

This report sender writes reports to the file system. Given a report with bunch dumpable items, the Dir sender will make a directory and write each item to a file in it, using the ident when practical, and a generated filename otherwise.

send_report

 $dir_reporter->send_report(\@summaries, \%arg, \%internal_arg);

This method makes a subdirectory for the report and writes it out.

%arg is the same set of arguments given to Exception::Reporter's report_exception method. Arguments that will have an effect include:

  reporter     - the name of the program reporting the exception
  handled      - if true, the reported exception was handled and the user
                 saw a simple error message; adds C<< "handled":true >>
                 to the JSON body of the report

%internal_arg contains data produced by the Exception::Reporter using this object. It includes the guid of the report and the caller calling the reporter.

The return value of send_report is not defined.

PERL VERSION

This module should work on any version of perl still receiving updates from the Perl 5 Porters. This means it should work on any version of perl released in the last two to three years. (That is, if the most recently released version is v5.40, then this module should work on both v5.40 and v5.38.)

Although it may work on older versions of perl, no guarantee is made that the minimum required version will not be increased. The version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl.

AUTHOR

Ricardo Signes <cpan@semiotic.systems>

COPYRIGHT AND LICENSE

This software is copyright (c) 2010 by Ricardo Signes.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.