summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/log.pl9
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/log.pl b/modules/log.pl
index 581f70b..8b30eab 100644
--- a/modules/log.pl
+++ b/modules/log.pl
@@ -46,9 +46,12 @@ sub logg
my $nostamp = $_;
$_ = strftime($cfg->{timefmt}, @time) . $_ . "\n";
my $line = $_;
- open(FH, $path) or die "Can't open $path: $!";
- print FH $line;
- close(FH);
+ if (open(FH, $path)) { # or die "Can't open $path: $!";
+ print FH $line;
+ close(FH);
+ } else {
+ print "COULDN'T PRINT TO $path - $line";
+ }
if (defined($::spy{$chan})) {
my $spy = $::spy{$chan};
print $spy $chan .": " . $nostamp . "\n";