my $log = Log::Simple->('path/to/file.log');
$log->open;
foreach my $stuff (@ARGV) {
$log->entry("Stuff happened: $stuff");
}
$log->exit("Bad stuff happened", 999);
The standard formatter just sticks a timestamp on each line and prints it.
If you don't define a default formatter with format, open, or new, the standard formatter will be used. If you do supply a default formatter, you can access the standard format for an entry by using 'standard' as the format argument.
I have been thinking about some variant of 'Format' for the name. Because it gets at what this module does that is different from the many other logging modules. The other option I've been considering is something like WithCallbacks. But I haven't on anything that works well.
|