GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  LOG::HANDLER::LEVELS (3)

.ds Aq ’

NAME

Log::Handler::Levels - All levels for Log::Handler.

CONTENTS

DESCRIPTION

Base class for Log::Handler.

Just for internal usage and documentation.

METHODS

    Default log level

<B>B>debug()<B>B>
<B>B>info()<B>B>
<B>B>notice()<B>B>
<B>B>warning()<B>B>, <B>B>warn()<B>B>
<B>B>error()<B>B>, <B>B>err()<B>B>
<B>B>critical()<B>B>, <B>B>crit()<B>B>
<B>B>alert()<B>B>
<B>B>emergency()<B>B>, <B>B>emerg()<B>B>

    Checking for active levels

<B>B>is_debug()<B>B>
<B>B>is_info()<B>B>
<B>B>is_notice()<B>B>
<B>B>is_warning()<B>B>, <B>B>is_warn()<B>B>
<B>B>is_error()<B>B>, <B>B>is_err()<B>B>
<B>B>is_critical()<B>B>, <B>B>is_crit()<B>B>
<B>B>is_alert()<B>B>
<B>B>is_emergency()<B>B>, <B>B>is_emerg()<B>B>

    Special level

<B>B>fatal()<B>B> Alternative for the levels critical - emergency.
<B>B>is_fatal()<B>B> Check if one of the levels critical - emergency is active.

    Special methods

<B>B>trace()<B>B> This method is very useful if you want to add a full backtrace to your message. Maybe you want to intercept unexpected errors and want to know who called die().



    $SIG{__DIE__} = sub { $log->trace(emergency => @_) };



By default the backtrace is logged as level debug.



    # would log with the level debug
    $log->trace(who called who);



If you want to log with another level then you can pass the level as first argument:



    $log->trace(info => $message);



<B>B>dump()<B>B> If you want to dump something then you can use dump(). The default level is debug.



    my %hash = (foo => 1, bar => 2);

    $log->dump(\%hash);



If you want to log with another level then you can pass the level as first argument:



    $log->dump($level => \%hash);



<B>B>die()<B>B> This method logs the message to the output and then call Carp::croak() with the level emergency by default.



    $log->die(an emergency error here);



If you want to log with another level, then you can pass the level as first argument:



    $log->die(fatal => an emergency error here);



<B>B>log()<B>B> With this method it’s possible to log messages with the log level as first argument:



    $log->log(info => an info message);



Is the same like



    $log->info(an info message);



and



    $log->log(an info message);



If you log without a level then the default level is info.

PREREQUISITES



    Carp
    Data::Dumper



EXPORTS

No exports.

REPORT BUGS

Please report all bugs to <jschulz.cpan(at)bloonix.de>.

If you send me a mail then add Log::Handler into the subject.

AUTHOR

Jonny Schulz <jschulz.cpan(at)bloonix.de>.

COPYRIGHT

Copyright (C) 2007-2009 by Jonny Schulz. All rights reserved.

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

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 LOG::HANDLER::LEVELS (3) 2013-11-03

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.