
Puppet::LogBody - Log facility

use Puppet::LogBody ;
my $log = new Puppet::LogBody
(
name => 'log test',
'how' => 'print'
) ;
$log -> log("hello") ; # printed on STDOUT
$log -> log("world",'how' => 'warn') ; # printed on STDERR
my @a = $log-> getAll() ; # @a contains ['hello','world']

This class implements a log facility which can either print on STDOUT or warn on STDERR (or hide) the log message. But in any case, the log message will be stored in the class so that all log messages can be retrieved later by the user.

Creates the log object.
Parameters are
For instance if name is set to 'foo' a call to log('hello') will print:
foo:
hello

As Puppet::LogBody inherits from Puppet::Log, all the parent methods are available.
Will log the passed text
Optional parameters are:
Clear all stored logs
Return an array made of all stored logs.

Puppet classes are a set of utility classes which can be used by any object. If you use directly the Puppet::*Body class, you get the plain functionnality. And if you use the Puppet::* class, you can get the same functionnality and a Tk Gui to manage it.

Dominique Dumont, ddumont at cpan dot org.
Copyright (c) 1998-1999,2007 Dominique Dumont. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

perl(1), Puppet::Log(3)