Index: Slim/Utils/Misc.pm =================================================================== --- Slim/Utils/Misc.pm (revision 4936) +++ Slim/Utils/Misc.pm (working copy) @@ -879,15 +879,15 @@ sub msg { use bytes; + my $entry = shift; + my $forceLog = shift || 0; - my $now = int(Time::HiRes::time() * 10000); + if ( $::LogTimestamp ) { + my $now = substr(int(Time::HiRes::time() * 10000),-4); + $entry = join( strftime( "%Y-%m-%d %H:%M:%S.", localtime ), + $now , ' ' , $entry ); + } - my $entry = strftime "%Y-%m-%d %H:%M:%S.", localtime; - $entry .= (substr $now, -4) . " "; - $entry .= shift; - - my $forceLog = shift || 0; - print STDERR $entry; if ($forceLog || Slim::Utils::Prefs::get('livelog')) { Index: slimserver.pl =================================================================== --- slimserver.pl (revision 4936) +++ slimserver.pl (working copy) @@ -338,6 +338,7 @@ $localClientNetAddr $localStreamAddr $newVersion + $LogTimestamp $pidfile $prefsfile $priority @@ -688,6 +689,7 @@ --cachedir => Directory for SlimServer to save cached music and web data --diag => Use diagnostics, shows more verbose errors. Also slows down library processing considerably --logfile => Specify a file for error logging. + --noLogTimestamp => Don't add timestamp to log output --daemon => Run the server in the background. This may only work on Unix-like systems. --stdio => Use standard in and out as a command line interface @@ -786,6 +788,7 @@ } sub initOptions { + $LogTimestamp=1; if (!GetOptions( 'user=s' => \$user, 'group=s' => \$group, @@ -796,6 +799,7 @@ 'httpaddr=s' => \$httpaddr, 'httpport=s' => \$httpport, 'logfile=s' => \$logfile, + 'LogTimestamp!' => \$LogTimestamp, 'audiodir=s' => \$audiodir, 'playlistdir=s' => \$playlistdir, 'cachedir=s' => \$cachedir,