mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-26 23:25:56 -05:00
Use a single log domain on DPRINTF() calls
This commit is contained in:
parent
803ca7e59f
commit
2127aff906
@ -1216,7 +1216,7 @@ int db_sql_enum_start(char **pe, DBQUERYINFO *pinfo) {
|
||||
browse=1;
|
||||
break;
|
||||
default:
|
||||
DPRINTF(E_LOG,L_DB|L_DAAP,"Unknown query type\n");
|
||||
DPRINTF(E_LOG,L_DB,"Unknown query type\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,7 @@ scan_m3u_playlist(char *file)
|
||||
int pl_id;
|
||||
int ret;
|
||||
|
||||
DPRINTF(E_INF, L_SCAN | L_PL, "Processing static playlist: %s\n", file);
|
||||
DPRINTF(E_INF, L_SCAN, "Processing static playlist: %s\n", file);
|
||||
|
||||
ret = stat(file, &sb);
|
||||
if (ret < 0)
|
||||
@ -142,7 +142,7 @@ scan_m3u_playlist(char *file)
|
||||
return;
|
||||
}
|
||||
|
||||
DPRINTF(E_INF, L_SCAN | L_PL, "Added playlist as id %d\n", pl_id);
|
||||
DPRINTF(E_INF, L_SCAN, "Added playlist as id %d\n", pl_id);
|
||||
|
||||
while (fgets(buf, sizeof(buf), fp) != NULL)
|
||||
{
|
||||
@ -195,19 +195,19 @@ scan_m3u_playlist(char *file)
|
||||
continue;
|
||||
}
|
||||
|
||||
DPRINTF(E_DBG, L_SCAN | L_PL, "Checking %s\n", filename);
|
||||
DPRINTF(E_DBG, L_SCAN, "Checking %s\n", filename);
|
||||
|
||||
mfi = db_fetch_path(&db_errmsg, filename, 0);
|
||||
if (!mfi)
|
||||
{
|
||||
DPRINTF(E_WARN, L_SCAN | L_PL, "Playlist entry '%s' not found: %s\n", entry, db_errmsg);
|
||||
DPRINTF(E_WARN, L_SCAN, "Playlist entry '%s' not found: %s\n", entry, db_errmsg);
|
||||
|
||||
free(db_errmsg);
|
||||
free(filename);
|
||||
continue;
|
||||
}
|
||||
|
||||
DPRINTF(E_DBG, L_SCAN | L_PL, "Resolved %s to %d\n", filename, mfi->id);
|
||||
DPRINTF(E_DBG, L_SCAN, "Resolved %s to %d\n", filename, mfi->id);
|
||||
db_add_playlist_item(NULL, pl_id, mfi->id);
|
||||
db_dispose_item(mfi);
|
||||
}
|
||||
@ -222,5 +222,5 @@ scan_m3u_playlist(char *file)
|
||||
|
||||
fclose(fp);
|
||||
|
||||
DPRINTF(E_INF, L_SCAN | L_PL, "Done processing playlist\n");
|
||||
DPRINTF(E_INF, L_SCAN, "Done processing playlist\n");
|
||||
}
|
||||
|
14
src/main.c
14
src/main.c
@ -466,7 +466,7 @@ int main(int argc, char *argv[]) {
|
||||
ret = mdns_init();
|
||||
if (ret != 0)
|
||||
{
|
||||
DPRINTF(E_FATAL, L_MAIN | L_REND, "mDNS init failed\n");
|
||||
DPRINTF(E_FATAL, L_MAIN, "mDNS init failed\n");
|
||||
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
@ -475,16 +475,16 @@ int main(int argc, char *argv[]) {
|
||||
err = db_open(&perr, "sqlite3", "/var/cache/mt-daapd"); /* FIXME */
|
||||
|
||||
if(err) {
|
||||
DPRINTF(E_LOG,L_MAIN|L_DB,"Error opening db: %s\n",perr);
|
||||
DPRINTF(E_LOG,L_MAIN,"Error opening db: %s\n",perr);
|
||||
|
||||
mdns_deinit();
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* Initialize the database before starting */
|
||||
DPRINTF(E_LOG,L_MAIN|L_DB,"Initializing database\n");
|
||||
DPRINTF(E_LOG,L_MAIN,"Initializing database\n");
|
||||
if(db_init(reload)) {
|
||||
DPRINTF(E_FATAL,L_MAIN|L_DB,"Error in db_init: %s\n",strerror(errno));
|
||||
DPRINTF(E_FATAL,L_MAIN,"Error in db_init: %s\n",strerror(errno));
|
||||
}
|
||||
|
||||
/* Spawn file scanner thread */
|
||||
@ -551,7 +551,7 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
txtrecord[9] = NULL;
|
||||
|
||||
DPRINTF(E_LOG,L_MAIN|L_REND,"Registering rendezvous names\n");
|
||||
DPRINTF(E_LOG,L_MAIN,"Registering rendezvous names\n");
|
||||
|
||||
port = cfg_getint(lib, "port");
|
||||
|
||||
@ -593,12 +593,12 @@ int main(int argc, char *argv[]) {
|
||||
DPRINTF(E_LOG, L_MAIN, "File scanner deinit\n");
|
||||
filescanner_deinit();
|
||||
|
||||
DPRINTF(E_LOG, L_MAIN | L_REND, "mDNS deinit\n");
|
||||
DPRINTF(E_LOG, L_MAIN, "mDNS deinit\n");
|
||||
mdns_deinit();
|
||||
|
||||
conffile_unload();
|
||||
|
||||
DPRINTF(E_LOG,L_MAIN|L_DB,"Closing database\n");
|
||||
DPRINTF(E_LOG,L_MAIN,"Closing database\n");
|
||||
db_deinit();
|
||||
|
||||
if (background)
|
||||
|
Loading…
Reference in New Issue
Block a user