Log::Simple - Basic runtime logger


NAME

Log::Simple - Basic runtime logger


SYNOPSIS

  use Log::Simple ( 6 );
  set_logger( 2, sub { print join ( "", @_, "\n") } );
  set_logger( 3, sub { print "$_\n" for @_ } );
  logger( 1, "hello" );
  logger( 7, "this", $message, "never appears" );
  logger( 2, "this", "message", "will", "be", "printed", "without", "space" );
  logger( 3, "this", "message", "will", "be", "printed", "a", "word", "by", "line" );
  package       My::Example;
  use   Log::Simple ( 7 );
  logger( 7, "this message appears" );
  set_local_logger( 3, sub { print join ( "", @_, "too\n") } );
  logger( 2, "this", "message", "will", "be", "printed", "without", "space" );
  logger( 3, "this", "message", "will", "be", "printed", "without", "space" );


DESCRIPTION

External Functions

logger( $level, @messages )
log informations

set_logger ( $level , $callback )
Install an generic Logger.

set_local_logger ( $level , $callback )
install an local Logger.

Internal Functions

std_logger( @messages )
log information to STDERR

time_track( )
callback which permit to timestamp messages. =cut sub time_track { Log::Simple::std_logger( ``time_track'', time(), ( caller ) ) }

import
Set the Logging/Debug level and export external functions


BUGS


TO DO


COPYRIGHT, LICENCE

 Copyright (c) 1997-2006 Samuel MOUNIEE

This file is part of Log::Simple.

Log::Simple 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; version 2 of the License.

Log::Simple 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 Log::Simple ; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA


AUTHOR

Samuel Mouniée aka Moun's, mouns@cpan.org


MAIN REPOSITORY

http://www.mouns.net/devel/CPAN/


SEE ALSO

perl(1).

 Log::Simple - Basic runtime logger