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

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

Serving Software Downloads in 976 Categories, Downloaded 29.546.654 Times

Log::Localized 0.05

  Date Added: October 11, 2010  |  Visits: 558

Log::Localized

Report Broken Link
Printer Friendly Version


Product Homepage
Download (71 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  
Libraries  -  Alien Perl module 0.91
Alien Perl module package contains external libraries wrapped up for your viewing pleasure! SYNOPSIS perldoc Alien; Alien is a package that exists just to hold together an idea, the idea of Alien:: packages, so there is no code here, just...
10.24 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  -  Test::AutoBuild::Runtime 1.2.0
Test::AutoBuild::Runtime is a Perl module with builder runtime state. SYNOPSIS use Test::AutoBuild::Runtime; my $runtime = new Test::AutoBuild::Runtime (archive_manager => $archive_manager, monitors => %monitors, repositories =>...
204.8 KB  
Libraries  -  OpenGeoDB Perl module 0.4
OpenGeDB Perl module is a module to access the OpenGeoDB database and calculate all ZIP codes in a certain radius..
3.07 KB  
Libraries  -  Apache::PAR::tutorial 0.30
Apache::PAR::tutorial is a Perl module with information on getting Apache::PAR up and running. Apache::PAR is a framework for including Perl ARchive files in a mod_perl (1.x or 2.x) environment. It allows an author to package up a web...
25.6 KB  
Libraries  -  File::Remote 1.17
File::Remote is a Perl module to read/write/edit remote files transparently. SYNOPSIS # # Two ways to use File::Remote # # First, the function-based style. Here, we can use the # special :replace tag to overload Perl builtins! # use...
15.36 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by freedesktop.org, it is used to describe information about an application such as the name and...
327.68 KB  
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  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
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  
Libraries  -  App::SimpleScan::Substitution::Line 2.02
App::SimpleScan::Substitution::Line is a line with optional fixed variable values. SYNOPSIS my $line = App::SimpleScan::Substitution::Line->new(" this "); # Use only this value when substituting " ". $line->fix(substituite =>...
54.27 KB