Aaron Brown > perfSONAR_PS-Base > perfSONAR_PS::NetLogger

Download:
perfSONAR_PS-Base-0.092.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.09   Source  

NAME ^

NetLogger - A module that provides tools to generate NetLogger formatted messages for log4perl

DESCRIPTION ^

For more information on NetLogger see: http://dsd.lbl.gov/NetLoggerWiki/index.php/Main_Page

SYNOPSIS ^

API ^

The API of NetLogger is used to format log messages in the NetLogger 'Best Practices' format. See: http://www.cedps.net/wiki/index.php/LoggingBestPractices

format("event_name", list of name=>value pairs)

Sample use:

  use Log::Log4perl qw(:easy);
  use NetLogger;
  Log::Log4perl->easy_init($DEBUG);

  my $logger = get_logger("my_prog");

  $logger->info(NetLogger::format("org.perfsonar.client.parseResults.start"));
  # call function here
  $logger->info(NetLogger::format("org.perfsonar.client.parseResults.end", {val=>12,}));

This will generate a log that looks like this:

2007/12/19 13:51:26 39899 INFO> myprog:NN main:: - ts=2007-12-19T21:51:26.030823Z \ event=org.perfsonar.client.runQuery1.end guid=736ee764-ae7c-11dc-9f7d-000f1f6ed15d

AUTHOR ^

Dan Gunter, dkgunter@lbl.gov

LICENSE ^

See: http://dsd.lbl.gov/NetLoggerWiki/index.php/Licensing

COPYRIGHT ^

Copyright (c) 2004-2007, Lawrenence Berkeley National Lab and the University of California All rights reserved.

syntax highlighting: