On Sat, 17 Mar 2007, [iso-8859-1] J=FCrgen Sch=F6neberg wrote:
> - I just wonder about the usage of the levels:
> I have a sript including user interations:
> usual 'print' to the user and
> $in =3D <STDIN>; for user input
> I also want to log this interactions.
> but none of the Log4perl log levels seems to be
> appropriate for this.
> (of course I could use a custom level e.g $logger->print())
> but shouldn't this be included in Log4perl by default?
> (with highest log priority , higher than level FATAL?)
If you want a priority level that's higher than FATAL, there is
one: "OFF".
This strange name comes from the fact that Log4perl sets levels as
hurdles to block messages and the level "OFF" blocks even FATAL
messages.
On the flip side, a message with priority "OFF" will pass any hurdle,
even levels "FATAL" and "OFF".
So is this what you are looking for?
use Log::Log4perl qw(get_logger);
my $logger =3D get_logger();
$logger->off("This message is unstoppable");
-- Mike
Mike Schilli
m...@pe...
|