aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-11-28 09:31:43 +0100
committerMax Kellermann <max@duempel.org>2011-11-28 09:31:43 +0100
commita727d0bb0b2b3757a32c27caa1b794fe0b3ddf6b (patch)
tree72847b5d3adb956037052383ffe3ffe151361164
parent0a218ee56ae37bcebeb716d5faa18f91e6e75556 (diff)
downloadmpd-a727d0bb0b2b3757a32c27caa1b794fe0b3ddf6b.tar.gz
mpd-a727d0bb0b2b3757a32c27caa1b794fe0b3ddf6b.tar.xz
mpd-a727d0bb0b2b3757a32c27caa1b794fe0b3ddf6b.zip
log: print reason for failure
-rw-r--r--NEWS1
-rw-r--r--src/log.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 8857a628d..28c8b1bb8 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,7 @@ ver 0.16.6 (2010/??/??)
* encoder:
- flac, null, wave: fix buffer corruption bug
- wave: support packed 24 bit samples
+* log: print reason for failure
* event_pipe: fix WIN32 regression
* define WINVER in ./configure
* WIN32: autodetect filesystem encoding
diff --git a/src/log.c b/src/log.c
index 556c8b04f..99a9a8f6d 100644
--- a/src/log.c
+++ b/src/log.c
@@ -139,8 +139,8 @@ log_init_file(const char *path, unsigned line)
out_filename = path;
out_fd = open_log_file();
if (out_fd < 0)
- MPD_ERROR("problem opening log file \"%s\" (config line %u) "
- "for writing\n", path, line);
+ MPD_ERROR("failed to open log file \"%s\" (config line %u): %s",
+ path, line, g_strerror(errno));
g_log_set_default_handler(file_log_func, NULL);
}