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

NAME

Log::Dispatch::Desktop::Notify - Log::Dispatch notification backend using Desktop::Notify

VERSION

version v0.0.2

SYNOPSIS

    use Log::Dispatch;
    use Log::Dispatch::Desktop::Notify;

    my $log = Log::Dispatch->new();

    $log->add( Log::Dispatch::Desktop::Notify->new(
                 min_level => 'warning'
               ));

    $log->log( level => 'warning', message => 'a problem!' );

DESCRIPTION

Log::Dispatch::Desktop::Notify is a backend for Log::Dispatch that displays messages via the Desktop Notification Framework (think libnotify) using Desktop::Notify.

METHODS

new

Creates a new Log::Dispatch::Desktop::Notify object. Expects named parameters as a hash. In addition to the usual parameters of Log::Dispatch::Output these parameters are also supported:

timeout

Default value: -1

Sets the message timeout in milliseconds. 0 disables the timeout, the message has to be closed manually. -1 uses the default timeout of the notification server.

app_name

Default value: $0 (script name)

Sets the application name for the message display.

Note: If Desktop::Notify can't establish a Dbus session (no messages can be sent), a Log::Dispatch::Null object is returned instead.

log_message

This message is called internally by Log::Dispatch::log() to display a message. Expects named parameters in a hash. Currently, only the usual Log::Dispatch::Output parameters level and message are supported.

BUGS AND LIMITATIONS

To report a bug, please use the github issue tracker: https://github.com/mmitch/log-dispatch-desktop-notify/issues

AVAILABILITY

github repository

git://github.com/mmitch/log-dispatch-desktop-notify.git

github browser

https://github.com/mmitch/log-dispatch-desktop-notify

github issue tracker

https://github.com/mmitch/log-dispatch-desktop-notify/issues

BUILD STATUS

Build Status

TEST COVERAGE

Coverage Status

SEE ALSO

AUTHOR

Christian Garbs <mitch@cgarbs.de>

COPYRIGHT AND LICENSE

Copyright (C) 2017 Christian Garbs

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.