Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

log::dispatchouli::proxy(3pm) [debian man page]

Log::Dispatchouli::Proxy(3pm)				User Contributed Perl Documentation			     Log::Dispatchouli::Proxy(3pm)

NAME
Log::Dispatchouli::Proxy - a simple wrapper around Log::Dispatch VERSION
version 2.005 DESCRIPTION
A Log::Dispatchouli::Proxy object is the child of a Log::Dispatchouli logger (or another proxy) and relays log messages to its parent. It behaves almost identically to a Log::Dispatchouli logger, and you should refer there for more of its documentation. Here are the differences: o You can't create a proxy with "->new", only by calling "->proxy" on an existing logger or proxy. o "set_debug" will set a value for the proxy; if none is set, "get_debug" will check the parent's setting; "clear_debug" will clear any set value on this proxy o "log_debug" messages will be redispatched to "log" (bug to the 'debug' logging level) to prevent parent loggers from dropping them due to "debug" setting differences AUTHOR
Ricardo SIGNES <rjbs@cpan.org> COPYRIGHT AND LICENSE
This software is copyright (c) 2011 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. perl v5.10.1 2011-04-08 Log::Dispatchouli::Proxy(3pm)

Check Out this Related Man Page

Log::Contextual::TeeLogger(3pm) 			User Contributed Perl Documentation			   Log::Contextual::TeeLogger(3pm)

NAME
Log::Contextual::TeeLogger - Output to more than one logger SYNOPSIS
use Log::Contextual::SimpleLogger; use Log::Contextual::TeeLogger; use Log::Contextual qw( :log ), -logger => Log::Contextual::TeeLogger->new({ loggers => [ Log::Contextual::SimpleLogger->new({ levels => [ 'debug' ] }), Log::Contextual::SimpleLogger->new({ levels => [ 'info' ], coderef => sub { print @_ }, }), ]}); ## docs below here not yet edited log_info { 'program started' }; # no-op because info is not in levels sub foo { log_debug { 'entered foo' }; ... } DESCRIPTION
This module is a simple logger made mostly for demonstration and initial experimentation with Log::Contextual. We recommend you use a real logger instead. For something more serious but not overly complicated, take a look at Log::Dispatchouli. METHODS
new Arguments: "Dict[ levels => ArrayRef[Str], coderef => Optional[CodeRef] ] $conf" my $l = Log::Contextual::SimpleLogger->new({ levels => [qw( info warn )], coderef => sub { print @_ }, # the default prints to STDERR }); Creates a new SimpleLogger object with the passed levels enabled and optionally a "CodeRef" may be passed to modify how the logs are output/stored. Levels may contain: trace debug info warn error fatal $level Arguments: @anything All of the following six methods work the same. The basic pattern is: sub $level { my $self = shift; print STDERR "[$level] " . join qq{ }, @_; if $self->is_$level; } trace $l->trace( 'entered method foo with args ' join q{,}, @args ); debug $l->debug( 'entered method foo' ); info $l->info( 'started process foo' ); warn $l->warn( 'possible misconfiguration at line 10' ); error $l->error( 'non-numeric user input!' ); fatal $l->fatal( '1 is never equal to 0!' ); is_$level All of the following six functions just return true if their respective level is enabled. is_trace say 'tracing' if $l->is_trace; is_debug say 'debuging' if $l->is_debug; is_info say q{info'ing} if $l->is_info; is_warn say 'warning' if $l->is_warn; is_error say 'erroring' if $l->is_error; is_fatal say q{fatal'ing} if $l->is_fatal; AUTHOR
See "AUTHOR" in Log::Contextual COPYRIGHT
See "COPYRIGHT" in Log::Contextual LICENSE
See "LICENSE" in Log::Contextual perl v5.10.1 2010-07-09 Log::Contextual::TeeLogger(3pm)
Man Page