Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

log::nullloglite(3pm) [debian man page]

NullLogLite(3pm)					User Contributed Perl Documentation					  NullLogLite(3pm)

NAME
Log::NullLogLite - The "Log::NullLogLite" class implements the Null Object pattern for the "Log::LogLite" class. SYNOPSIS
use Log::NullLogLite; # create new Log::NullLogLite object my $log = new Log::NullLogLite(); ... # we had an error (this entry will not be written to the log # file because we use Log::NullLogLite object). $log->write("Could not open the file ".$file_name.": $!", 4); DESCRIPTION
The "Log::NullLogLite" class is derived from the "Log::LogLite" class and implement the Null Object Pattern to let us to use the "Log::LogLite" class with null "Log::LogLite" objects. We might want to do that if we use a "Log::LogLite" object in our code, and we do not want always to actually define a "Log::LogLite" object (i.e. not always we want to write to a log file). In such a case we will create a "Log::NullLogLite" object instead of the "Log::LogLite" object, and will use that object instead. The object has all the methods that the "Log::LogLite" object has, but those methods do nothing. Thus our code will continue to run without any change, yet we will not have to define a log file path for the "Log::LogLite" object, and no log will be created. CONSTRUCTOR
new ( FILEPATH [,LEVEL [,DEFAULT_MESSAGE ]] ) The constructor. The parameters will not have any affect. Returns the new Log::NullLogLite object. METHODS
write( MESSAGE [, LEVEL ] ) Does nothing. The parameters will not have any affect. Returns nothing. level( [ LEVEL ] ) Does nothing. The parameters will not have any affect. Returns -1. default_message( [ MESSAGE ] ) Does nothing. The parameters will not have any affect. Returns empty string (""). AUTHOR
Rani Pinchuk, rani@cpan.org COPYRIGHT
Copyright (c) 2001-2002 Ockham Technology N.V. & Rani Pinchuk. All rights reserved. This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
Log::LogLite(3), The Null Object Pattern - Bobby Woolf - PLoP96 - published in Pattern Languages of Program Design 3 (http://cseng.aw.com/book/0,,0201310112,00.html) perl v5.10.0 2009-05-13 NullLogLite(3pm)

Check Out this Related Man Page

Catalyst::Plugin::Log::Dispatch(3pm)			User Contributed Perl Documentation		      Catalyst::Plugin::Log::Dispatch(3pm)

NAME
Catalyst::Plugin::Log::Dispatch - Log module of Catalyst that uses Log::Dispatch VERSION
This document describes Catalyst::Plugin::Log::Dispatch version 2.15 SYNOPSIS
package MyApp; use Catalyst qw/Log::Dispatch/; configuration in source code MyApp->config->{ Log::Dispatch } = [ { class => 'File', name => 'file', min_level => 'debug', filename => MyApp->path_to('debug.log'), format => '[%p] %m %n', }]; in myapp.yml Log::Dispatch: - class: File name: file min_level: debug filename: __path_to(debug.log)__ mode: append format: '[%p] %m %n' If you use Catalyst::Plugin::ConfigLoader, please load this module after Catalyst::Plugin::ConfigLoader. DESCRIPTION
Catalyst::Plugin::Log::Dispatch is a plugin to use Log::Dispatch from Catalyst. CONFIGURATION
It is same as the configuration of Log::Dispatch excluding "class" and "format". class The class name to Log::Dispatch::* object. Please specify the name just after "Log::Dispatch::" of the class name. format It is the same as the format option of Log::Dispatch::Config. DEPENDENCIES
Catalyst, Log::Dispatch, Log::Dispatch::Config AUTHOR
Shota Takayama "<shot[at]bindstorm.jp>" LICENCE AND COPYRIGHT
Copyright (c) 2006, Shota Takayama "<shot[at]bindstorm.jp>". All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. perl v5.14.2 2012-04-15 Catalyst::Plugin::Log::Dispatch(3pm)
Man Page