From 2127aff906a1ff8d589b84e27791c00c3457b112 Mon Sep 17 00:00:00 2001 From: Julien BLACHE Date: Tue, 5 May 2009 20:28:40 +0200 Subject: [PATCH] Use a single log domain on DPRINTF() calls --- src/db-sql.c | 2 +- src/filescanner_m3u.c | 12 ++++++------ src/main.c | 14 +++++++------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/db-sql.c b/src/db-sql.c index a4dc2f82..749ab71b 100644 --- a/src/db-sql.c +++ b/src/db-sql.c @@ -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; } diff --git a/src/filescanner_m3u.c b/src/filescanner_m3u.c index 4a415b44..d9f6af1d 100644 --- a/src/filescanner_m3u.c +++ b/src/filescanner_m3u.c @@ -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"); } diff --git a/src/main.c b/src/main.c index 0043992c..5a3c8f1a 100644 --- a/src/main.c +++ b/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)