Hello !
here my hint :
#!/usr/bin/perl
use strict;
use warnings;
use Log::Log4perl qw(:easy);
Log::Log4perl->easy_init(
{
file => ">> my_error_log",
level => $ERROR,
},
{
file => "STDERR",
level => $ERROR,
}
);
For more informations see http://log4perl.sourceforge.net
Stéphane
>>> <[email protected]> 24.06.2009 18:25 >>>
I'd like to automatically have my script's errors and warnings sent to
both STDOUT (console) and a log file. What is the proper way of doing this?
Pablo
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/
Postbank Systems AG
Baunscheidtstraße 8
53113 Bonn
Sitz Bonn, Amtsgericht Bonn, HRB 8867
Vorstand: Klaar de Graaf, Vorsitzender
Manfred Löw, Dr. Thomas Mangel
Aufsichtsrat: Dr. Mario Daberkow, Vorsitzender
______________________________
Diese Nachricht ist nur für den vorgesehenen Empfänger bestimmt. Sollten Sie
nicht der vorgesehene Empfänger dieser E-Mail und ihres Inhalts sein oder diese
E-Mail irrtümlich erhalten haben, bitten wir Sie, den Absender unverzüglich
darüber zu informieren und diese Nachricht und all ihre Anhänge vollständig von
Ihrem Computer zu löschen.
Jede Form der unbefugten Nutzung, Veröffentlichung, des Kopierens oder der
Offenlegung des Inhalts dieser E-Mail ist nicht gestattet.
Bitte denken Sie über Ihre Verantwortung gegenüber der Umwelt nach, bevor Sie
diese E-Mail ausdrucken.
This message is intended for the addressee only. If you are not the intended
recipient of this e-mail message and its content or have received this e-mail
in error, please notify the sender immediately and delete this message and all
its attachments.
Any form of unauthorized use, publication, copying or disclosure of the content
of this e-mail is prohibited.
Please consider your environmental responsibility before printing this mail.
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/