Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.236.316 Times

Log::Localized 0.05

  Date Added: October 11, 2010  |  Visits: 819

Log::Localized

Report Broken Link
Printer Friendly Version


Product Homepage
Download (87 downloads)



Log::Localized is a Perl module to localize your logging. SYNOPSIS What you most probably want to do is something like: package Foo; use Log::Localized; sub bar { # this message will be displayed if method bars verbosity is >= 1 llog(1,"running bar()"); } # this message will be displayed if package Foos verbosity is >= 3 llog(3,"loaded package Foo"); Then paste the following local verbosity rules in a file called verbosity.conf, in the same directory as your program: # log everything from wherever inside Foo and its subclasses, up to level 3 Foo:: = 3 # except for function Foo::foo who shall have verbosity 0 Foo::bar = 0 SYNOPSIS - ADVANCED In a program accepting command line arguments, you may want to do: use Getopt::Long; use Log::Localized log => 1; GetOptions("verbose|v+" => sub { $Log::Localized::VERBOSITY++; } ); llog(1,"you used -v"); llog(2,"you used -v -v"); You may alter local verbosity from within the running code: package Foo; use Log::Localized log => 1; # verbosity level is 0 by default { # set verbosity locally in this block local $Log::Debug::VERBOSITY = 5; llog(5,"this will be logged"); } debug(5,"but this wont"); If you want to import llog under another name in the calling module: package Foo; use Log::Localized rename => "my_log"; # call Log::Localized::llog() my_log(1,"renamed llog()"); See the examples directory in the module distribution for more real life examples. Log::Localized provides you with an interface for defining dynamically exactly which part of your code should log messages and with which verbosity. Log::Localized addresses one issue of traditional logging: in very large systems, a slight increase in logging verbosity usually generates insane amounts of logs. Hence the need of being able to turn on verbosity selectively in some areas of code only, in a localized way. Log::Localized is based on the concept of local verbosity. Each package and each function in a package has its own local verbosity, set to 0 by default. With Log::Localized you can change the local verbosity in just a function, just a package or just a class hierarchy via a so called verbosity rule. Verbosity rules are passed to Log::Localized either via a configuration file or via an import parameter. By changing verbosity rules according to the needs of the moment, you can alter your programs logging flow in a very fine-grained way, and get logs from only the code areas you are interested in. Log::Localized comes with default settings that make it usable out of the box, but its configuration options will let you redefine pretty much everything in its behavior. The actual logging in Log::Localized is handled by Log::Dispatch..

Requirements: No special requirements
Platforms: Linux
Keyword: Foo Libraries Local Log Loglocalized Module Package Perl Module Programming Verbosity
Users rating: 0/10

License: Freeware Size: 19.46 KB
USER REVIEWS
More Reviews or Write Review


LOG::LOCALIZED RELATED
Libraries  -  Log::Log4perl::Layout::PatternLayout 1.11
Log::Log4perl::Layout::PatternLayout Perl module contains a pattern layout. SYNOPSIS use Log::Log4perl::Layout::PatternLayout; my $layout = Log::Log4perl::Layout::PatternLayout->new( "%d (%F:%L)> %m"); Creates a pattern layout according...
225.28 KB  
Libraries  -  HTTPD::Log::Filter 1.08
HTTPD::Log::Filter is a Perl module to filter entries out of an httpd log. SYNOPSIS my $hlf = HTTPD::Log::Filter->new( exclusions_file => $exclusions_file, agent_re => .*Mozilla.*, format => ELF, ); while( ) { my $ret =...
10.24 KB  
Libraries  -  Log::StdLog 0.0.3
Log::StdLog is a Perl module with a simple log file via a special filehandle. SYNOPSIS use Log::StdLog { level => warn, file => "$0.log" }; # Messages at the same or a higher level are logged... print {*STDLOG} error => "This error message...
7.17 KB  
Libraries  -  SVN::Log::Index 0.51
SVN::Log::Index is a Perl module that can index and search over Subversion commit logs. SYNOPSIS my $index = SVN::Log::Index->new({ index_path => /path/to/index }); if($creating) { # Create from scratch if necessary $index->create({...
13.31 KB  
Web Server Tools  -  Relax 2.70
Relax is a free GPL licensed, multi-platform web server log analyzer written in Perl. This tool can be used to track which search engines, search keywords and referring URLs led visitors to the web site, to track down bad links and to analyze what...
127 KB  
Libraries  -  Log::Log4perl::JavaMap 1.11
Log::Log4perl::JavaMap is a Perl module that maps java log4j appenders to Log::Dispatch classes. SYNOPSIS ############################### log4j.appender.FileAppndr1 = org.apache.log4j.FileAppender log4j.appender.FileAppndr1.File =...
225.28 KB  
Libraries  -  SVK::Log::Filter::Babelfish 0.0.3
SVK::Log::Filter::Babelfish is a Perl module to translate logs to various natural languages. SYNOPSIS > svk log --filter babelfish de //mirror/project/trunk ---------------------------------------------------------------------- r1234 (orig...
5.12 KB  
Libraries  -  Geo::Track::Log 0.02
Geo::Track::Log is a Perl module that represent track logs and find a location based on a track log and a date. SYNOPSIS use Geo::Track::Log; my $log = new Geo::Track::Log; # add a point to a track log. $log->addPoint( { timestamp =>...
17.41 KB  
Libraries  -  AutoSplit 5.8.8
AutoSplit is a Perl module that can split a package for autoloading. SYNOPSIS autosplit($file, $dir, $keep, $check, $modtime); autosplit_lib_modules(@modules); This function will split up your program into files that the AutoLoader module...
12.2 MB  
Libraries  -  Data::Inherited 1.00
Data::Inherited is a Perl module with hierarchy-wide accumulation of list and hash results. SYNOPSIS package Foo; use base Data::Inherited; use constant PROPERTIES => (qw/name address/); package Bar; use base Foo; use constant PROPERTIES...
12.29 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB