From a07268e2aefbc8ce1dc2a660a8a68c2ab7010c4d Mon Sep 17 00:00:00 2001 From: fukachan Date: Sat, 22 Jun 2002 14:22:09 +0000 Subject: eval Log(warn ...) || print stderr it --- fml/lib/FML/Log.pm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/fml/lib/FML/Log.pm b/fml/lib/FML/Log.pm index 65bc1ba0..67208058 100644 --- a/fml/lib/FML/Log.pm +++ b/fml/lib/FML/Log.pm @@ -2,7 +2,7 @@ # # Copyright (C) 2000 Ken'ichi Fukamachi # -# $FML: Log.pm,v 1.16 2001/12/23 11:39:44 fukachan Exp $ +# $FML: Log.pm,v 1.17 2002/05/24 06:36:58 fukachan Exp $ # package FML::Log; @@ -137,7 +137,13 @@ sub Log sub LogWarn { my ($mesg, $args) = @_; - Log("warn: ".$mesg, $args); + + eval q{ + Log("warn: ".$mesg, $args); + }; + if ($@) { + print STDERR "warn: ", $mesg, "\n"; + } } -- cgit v1.2.1