From 5cea787672374b293c3d5261492076d780ff7b33 Mon Sep 17 00:00:00 2001 From: hjp Date: Thu, 15 Nov 2007 20:18:15 +0000 Subject: [PATCH] log files with timestamp --- scripts/da | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/da b/scripts/da index 9dac027..3c00a65 100755 --- a/scripts/da +++ b/scripts/da @@ -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});