From 1447c7d03cfcc841678f6dc6f81ee43ef4d98bef Mon Sep 17 00:00:00 2001 From: hjp Date: Thu, 15 Nov 2007 20:15:56 +0000 Subject: [PATCH] Log files with timestamp. --- backup | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backup b/backup index 51ae11c..5dba178 100755 --- a/backup +++ b/backup @@ -2,10 +2,12 @@ use warnings; use strict; use Simba::CA; +use POSIX qw(strftime); $ENV{PATH} = "/usr/bin"; -open(my $log, '>>', '/var/log/simba/ca.log'); +my $now = strftime('%Y-%m-%dT%H:%M:%S', localtime()); +open(my $log, '>>', '/var/log/simba/ca.log.' . $now); $log->autoflush(1); my $ca = Simba::CA->new({