mirror of
https://github.com/owntone/owntone-server.git
synced 2025-03-20 04:24:20 -04:00
change loggin destination
This commit is contained in:
parent
34c3ba8b2a
commit
abe5ffbd09
14
src/main.c
14
src/main.c
@ -753,6 +753,15 @@ int main(int argc, char *argv[]) {
|
|||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(!foreground) {
|
||||||
|
if(config.logfile) {
|
||||||
|
err_setdest(config.logfile,LOGDEST_LOGFILE);
|
||||||
|
} else {
|
||||||
|
err_setdest("mt-daapd",LOGDEST_SYSLOG);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef WITHOUT_MDNS
|
#ifndef WITHOUT_MDNS
|
||||||
if((config.use_mdns) && (!parseonly)) {
|
if((config.use_mdns) && (!parseonly)) {
|
||||||
DPRINTF(E_LOG,L_MAIN,"Starting rendezvous daemon\n");
|
DPRINTF(E_LOG,L_MAIN,"Starting rendezvous daemon\n");
|
||||||
@ -807,11 +816,6 @@ int main(int argc, char *argv[]) {
|
|||||||
|
|
||||||
/* Wait as long as we can to detach */
|
/* Wait as long as we can to detach */
|
||||||
if(!foreground) {
|
if(!foreground) {
|
||||||
if(config.logfile) {
|
|
||||||
err_setdest(config.logfile,LOGDEST_LOGFILE);
|
|
||||||
} else {
|
|
||||||
err_setdest("mt-daapd",LOGDEST_SYSLOG);
|
|
||||||
}
|
|
||||||
daemon_start();
|
daemon_start();
|
||||||
fprintf(pid_fp,"%d\n",getpid());
|
fprintf(pid_fp,"%d\n",getpid());
|
||||||
fclose(pid_fp);
|
fclose(pid_fp);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user