App::Framework::Feature::Logging - Application logging
# Include logging feature by: use App::Framework '+Logging' ;
Logging feature that provides log file handling for applications.
If the user specified -log command line option and specifies a valid log filename, then this module will manage any logging() calls, writing the data into the specified log file.
The following fields should be defined either in the call to 'new()', as part of a 'set()' call, or called by their accessor method (which is the same name as the field):
Created by the object. When the application starts, if the -log option has been specified, then the filename is copied into this field.
May be 'truncate' or 'append': 'truncate' clears any previous log file contents; 'append' appends the logging to previous file contents. Default is 'truncate'
When set, causes all logging to be echoed to STDOUT
This feature adds the following additional command line options to any application:
If a logfile is specified at the command line, then the file is created and all logging messages get written to that file. Otherwise, log messages are ignored.
Create a new Logging.
The %args are specified as they would be in the set method (see "Fields").
Initialises the Logging object class variables.
Called by the application framework at the start of the application.
This method checks for the user specifying any of the options described above (see "ADDITIONAL COMMAND LINE OPTIONS") and handles them if so.
Log the argument(s) to the log file iff a log file has been specified.
The list of arguments may be: SCALAR, ARRAY reference, HASH reference, SCALAR reference. SCALAR and SCALAR ref are printed as-is without any extra newlines. ARRAY ref is printed out one entry per line with a newline added. The HASH ref is printed out in the format produced by App::Framework::Base::Object::DumpObj.
Same as "logging" but echoes output to STDOUT.
Alias to "logging"
Setting the debug flag to level 1 prints out (to STDOUT) some debug messages, setting it to level 2 prints out more verbose messages.
<sdprice at cpan.org>
None that I know of!