I believe a lot of log processing is done too early.
This module lets you defer log processing in two ways:
* Defer recording of log messages until some "transaction" has completed
Typically this transaction is something like an HTTP request or a cron job.
Generally log messages are easier to read if they are recorded atomically and
are not intermingled with log messages created by other transactions.
* Defer rendering of log messages
Sometimes you don't know how logs should be rendered until long after the
message has been written. If you aren't sure what information you'll want to
display, or you expect to display the same logs in multiple formats, it makes
sense to store your logs in a highly structured format so they can be
reliably parsed and processed later.
This module doesn't actually write out logs! To use this module for normal
logging purposes you also need a logging library.
Perl module to rotate log files
Lvalue takes an object produced by some other package and wraps it
with lvalue functionality implemented with the object's original
getter and setter routines. Lvalue assumes its object uses the
relatively standard getter / setter idiom where any arguments is a
setter, and no arguments is a getter.
This provides a Log::Dispatch log output system that appends logged
events to an array reference. This is probably only useful for testing
the logging of your code.
Mac::FileSpec::Unixish provides two functions, `nativize' and `unixify'
(both of which are exported by default), that will allow you to denote
and manipulate pathspecs in Unixish style, and let you convert these
pathspecs to and from the native OS's format for conveying such things.
It currently assumes that if you are not running under MacOS (as
reported in `$^O'), you must be on a Unix box. If you want better, use
File::Spec -- in essence, Mac::FileSpec::Unixish is a cheap hack to get
around using File::Spec.
Log::Dispatch::ArrayWithLimits functions similarly to Log::Dispatch::Array, with
a few differences:
- only the messages (strings) are stored
- allow specifying array variable name (e.g. "My::array" instead of \@My:array)
This makes it possible to use in Log::Log4perl configuration, which is a text
file.
- can apply some limits
Currently only max_elems (the maximum number of elements in the array) is
available. Future limits will be added (see "TODO").
Logging to an in-process array can be useful when debugging/testing, or when you
want to let users of your program connect to your program to request viewing the
ogs being produced.
Log::Dispatch::Colorful provides an object for logging to the screen.
Log::Dispatch::Config is a subclass of Log::Dispatch and provides a
way to configure Log::Dispatch object with configuration file
(default, in AppConfig format). This is almost a log4j equivalent for
Perl, not with all API compatibility though.
Memoize::ExpireLRU is a module that implements LRU expiration for Memoize.
`Memoizing' a function makes it faster by trading space for time. It
does this by caching the return values of the function in a table. If
you call the function again with the same arguments, memoize jumps in
and gives you the value out of the table, instead of letting the
function compute the value all over again.