summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rwxr-xr-xlib/Vyatta/Keepalived.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Vyatta/Keepalived.pm b/lib/Vyatta/Keepalived.pm
index 1f3c2592..fafaafe1 100755
--- a/lib/Vyatta/Keepalived.pm
+++ b/lib/Vyatta/Keepalived.pm
@@ -44,7 +44,8 @@ my $vrrp_log = "$state_dir/vrrp.log";
sub vrrp_log {
my $timestamp = strftime("%Y%m%d-%H:%M.%S", localtime);
- open my $fh, ">>", $vrrp_log;
+ open my $fh, '>>', $vrrp_log
+ or die "Can't open $vrrp_log:$!";
print $fh "$timestamp: ", @_ , "\n";
close $fh;
}