OpenInteract2::Log - Initialization for log4p logger
# Use the log in a website OpenInteract2::Log->init_from_website( $website_dir ); # Create a log on the fly, using the default level, saved to file # 'oi2_tests.log' my $logfile = 'oi2_tests.log'; OpenInteract2::Log->init_file( $logfile ); # Same, but using 'info' as level use Log::Log4perl qw( :levels ); OpenInteract2::Log->init_file( $logfile, $INFO ); # Create a log on the fly, sent to the screen OpenInteract2::Log->init_screen # Same, but using 'info' as level OpenInteract2::Log->init_screen( $INFO );
This just contains some centralized initialization methods so that Log::Log4perl is initialized and happy.
init_from_website( $website_dir )
Reads in the configuration file at $website_dir/conf/log4perl.conf and initializes the logger with it.
$website_dir/conf/log4perl.conf
init_file( $file, [ $root_logger_level ] )
Initializes the root logger to append its messages to $file at the level $root_logger_level (as exported by Log::Log4perl. If the level is not provided '$WARN' is used.
$file
$root_logger_level
If $file not given behaves as init_screen().
init_screen()
init_screen( [ $root_logger_level ] )
Initializes the root logger to write its messages to the screen at the level $root_logger_level (as exported by Log::Log4perl. If the level is not provided '$WARN' is used.
Copyright (c) 2002-2005 Chris Winters. All rights reserved.
Chris Winters <chris@cwinters.com>
To install OpenInteract2::URL, copy and paste the appropriate command in to your terminal.
cpanm
cpanm OpenInteract2::URL
CPAN shell
perl -MCPAN -e shell install OpenInteract2::URL
For more information on module installation, please visit the detailed CPAN module installation guide.