summaryrefslogtreecommitdiffstats
path: root/lib/log.lib.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/log.lib.php')
-rw-r--r--lib/log.lib.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/log.lib.php b/lib/log.lib.php
index d8e68014..d187fa60 100644
--- a/lib/log.lib.php
+++ b/lib/log.lib.php
@@ -30,6 +30,9 @@ function log_event($username='Unknown',$event_name,$event_description,$log_name=
/* Set it up here to make sure it's _always_ the same */
$log_time = time();
+ /* must have some name */
+ if (!strlen($log_name)) { $log_name = 'ampache'; }
+
$log_filename = conf('log_path') . "/$log_name." . date("Ymd",$log_time) . ".log";
$log_line = date("Y-m-d H:i:s",$log_time) . " { $username } ( $event_name ) - $event_description \n";