diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-09-30 21:45:51 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-09-30 21:45:51 +0000 |
commit | 9bfe4a4ff82b7fc59289e18100365fcaab8dc9b5 (patch) | |
tree | e244725772291d3f5d517d1e31eceeb928e90ca3 /lib | |
parent | 278434b60106387171ab51d036b3195d121de46f (diff) | |
download | ampache-9bfe4a4ff82b7fc59289e18100365fcaab8dc9b5.tar.gz ampache-9bfe4a4ff82b7fc59289e18100365fcaab8dc9b5.tar.bz2 ampache-9bfe4a4ff82b7fc59289e18100365fcaab8dc9b5.zip |
removed last vestiages of log_event
Diffstat (limited to 'lib')
-rw-r--r-- | lib/batch.lib.php | 9 | ||||
-rw-r--r-- | lib/class/stream.class.php | 8 | ||||
-rw-r--r-- | lib/stream.lib.php | 6 | ||||
-rw-r--r-- | lib/xmlrpc.php | 6 |
4 files changed, 11 insertions, 18 deletions
diff --git a/lib/batch.lib.php b/lib/batch.lib.php index af4ed80a..867956a9 100644 --- a/lib/batch.lib.php +++ b/lib/batch.lib.php @@ -64,16 +64,11 @@ function send_zip( $name, $song_files ) { $arc->set_options( $options ); $arc->add_files( $song_files ); if (count($arc->error)) { - if (conf('debug')) { - log_event($GLOBALS['user']->username,'archive',"Error: unable to add songs"); - - } + debug_event('archive',"Error: unable to add songs",'3'); } // if failed to add songs if (!$arc->create_archive()) { - if (conf('debug')) { - log_event($GLOBALS['user']->username,'archive',"Error: unable to create archive"); - } + debug_event('archive',"Error: unable to create archive",'3'); } // if failed to create archive $arc->download_file(); diff --git a/lib/class/stream.class.php b/lib/class/stream.class.php index 73892615..25f3707f 100644 --- a/lib/class/stream.class.php +++ b/lib/class/stream.class.php @@ -232,7 +232,7 @@ class Stream { /* Open the file for writing */ if (!$handle = @fopen($filename, "w")) { - log_event($_SESSION['userdata']['username'],"icecast","Fopen: $filename Failed"); + debug_event("icecast","Fopen: $filename Failed",'3'); echo _("Error, cannot write") . " $filename<br>\n"; exit; } @@ -243,7 +243,7 @@ class Stream { echo "$song->file<br>\n"; $line = "$song->file\n"; if (!fwrite($handle, $line)) { - log_event($_SESSION['userdata']['username'],"icecast","Fwrite: Unabled to write $line into $filename"); + debug_event("icecast","Fwrite: Unabled to write $line into $filename",'3'); echo _("Error, cannot write song in file") . " $song->file --> $filename"; exit; } // if write fails @@ -254,9 +254,7 @@ class Stream { fclose($handle); $cmd = conf('icecast_command'); $cmd = str_replace("%FILE%", $filename, $cmd); - if (conf('debug')) { - log_event($_SESSION['userdata']['username'],"icecast","Exec: $cmd"); - } + debug_event("icecast","Exec: $cmd",'3'); exec($cmd); exit; diff --git a/lib/stream.lib.php b/lib/stream.lib.php index 852df28a..bc30d7cb 100644 --- a/lib/stream.lib.php +++ b/lib/stream.lib.php @@ -254,10 +254,8 @@ function start_downsample($song,$now_playing_id=0,$song_name=0) { $downsample_command = str_replace("%SAMPLE%",$sample_rate,$downsample_command); // If we are debugging log this event - if (conf('debug')) { - $message = "Start Downsample: $downsample_command"; - log_event($GLOBALS['user']->username,' downsample ',$message); - } // if debug + $message = "Start Downsample: $downsample_command"; + debug_event('downsample',$message,'3'); $fp = @popen($downsample_command, 'rb'); diff --git a/lib/xmlrpc.php b/lib/xmlrpc.php index 5c47c377..8e016f60 100644 --- a/lib/xmlrpc.php +++ b/lib/xmlrpc.php @@ -165,7 +165,9 @@ function remote_session_verify($params) { } $encoded_data = php_xmlrpc_encode($data); - if (conf('debug')) { log_event($_SESSION['userdata']['username'],' xmlrpc-server ',"Encoded Session Verify: $data Recieved: $sid"); } + + debug_event('xmlrpc-server',"Encoded Session Verify: $data Recieved: $sid",'3'); + return new xmlrpcresp($encoded_data); } // remote_session_verify @@ -185,7 +187,7 @@ function remote_server_denied() { $encoded_array = php_xmlrpc_encode($result); - if (conf('debug')) { log_event($_SESSION['userdata']['username'], 'xmlrpc-server',"Access Denied: " . $_SERVER['REMOTE_ADDR']); } + debug_event('xmlrpc-server',"Access Denied: " . $_SERVER['REMOTE_ADDR'],'3'); return new xmlrpcresp($encoded_array); |