NAME

Log::Sentry - sending log messages to Sentry.

SYNOPSIS

my $raven = Log::Sentry->new(
   sentry_public_key => "public",
   sentry_secret_key => "secret",
   remote_url        => "sentry url"
);


$raven->message({ message => "Panic!" });

EXPORT

new

Constructor. Use like:

my $raven = Log::Sentry->new(
    sentry_public_key => "public",
    sentry_secret_key => "secret",
    remote_url        => "sentry url",
    sentry_version    => 3 # can be omitted
);

message

Send message to Sentry server.

$raven->message( { 
  'message'     => "Message", 
  'logger'      => "Name of the logger",                  # defult "root"
  'level'       => "Error level",                         # default 'error'
  'platform'    => "Platform name",                       # default 'perl',
  'culprit'     => "Module or/and function raised error", # default ""
  'tags'        => "Arrayref of tags",                    # default []
  'server_name' => "Server name where error occured",     # current host name is default
  'modules'     => "list of relevant modules",
  'extra'       => "extra params described below"
} );

The structure of 'modules' list is:

[
    {
        "my.module.name": "1.0"
    }
]

The structure of 'extra' field is:

{
  "my_key"           => 1,
  "some_other_value" => "foo bar"
}

LICENSE AND COPYRIGHT

Copyright 2013 Danil Orlov.

This program is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0). You may obtain a copy of the full license at:

http://www.perlfoundation.org/artistic_license_2_0