log files with timestamp

This commit is contained in:
hjp 2007-11-15 20:18:15 +00:00
parent 36d9cdef22
commit 5cea787672
1 changed files with 7 additions and 3 deletions

View File

@ -1,10 +1,14 @@
#!/usr/bin/perl -T
use warnings;
use strict;
use Simba::DA;
use lib 'blib/lib';
open(my $log, '>>', '/var/log/simba/da.log');
use POSIX qw(strftime);
use lib 'blib/lib';
use Simba::DA;
my $now = strftime('%Y-%m-%dT%H:%M:%S', localtime());
open(my $log, '>>', '/var/log/simba/da.log.' . $now);
$log->autoflush(1);
my $da = Simba::DA->new({fh_log => $log});