mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-26 23:25:56 -05:00
logging fixes
This commit is contained in:
parent
6170df9af4
commit
6f5b8b6e96
@ -88,8 +88,8 @@ void log_err(int level, char *fmt, ...)
|
||||
tt_now=time(NULL);
|
||||
gmtime_r(&tt_now,&tm_now);
|
||||
strftime(timebuf,sizeof(timebuf),"%F %T",&tm_now);
|
||||
fprintf(err_file,"%s %s: ",timebuf,errbuf);
|
||||
if(!level) fprintf(err_file,"%s %s: Aborting\n");
|
||||
fprintf(err_file,"%s: %s",timebuf,errbuf);
|
||||
if(!level) fprintf(err_file,"%s: Aborting\n",timebuf);
|
||||
fflush(err_file);
|
||||
break;
|
||||
case LOGDEST_STDERR:
|
||||
@ -127,7 +127,7 @@ void log_setdest(char *app, int destination) {
|
||||
|
||||
switch(destination) {
|
||||
case LOGDEST_LOGFILE:
|
||||
err_file=fopen(app,"w+");
|
||||
err_file=fopen(app,"a");
|
||||
if(err_file==NULL) {
|
||||
fprintf(stderr,"Error opening %s: %s\n",app,strerror(errno));
|
||||
exit(EXIT_FAILURE);
|
||||
|
@ -276,7 +276,7 @@ void daap_handler(WS_CONNINFO *pwsc) {
|
||||
ws_emitheaders(pwsc);
|
||||
|
||||
config_set_status(pwsc,session_id,"Streaming file '%s'",pmp3->fname);
|
||||
DPRINTF(ERR_LOG,"Session %d: Streaming %s to %s\n",session_id,
|
||||
DPRINTF(ERR_LOG,"Session %d: Streaming file '%s' to %s\n",session_id,
|
||||
pmp3->fname, pwsc->hostname);
|
||||
|
||||
config.stats.songs_served++; /* FIXME: remove stat races */
|
||||
|
Loading…
Reference in New Issue
Block a user