From 6c4fd620408b3f14a1d4164d58db70df7a252674 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 5 Sep 2004 00:03:16 +0000 Subject: implement proper logging git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@179 fefdeb5f-60dc-0310-8127-8f9354f1896f --- polyp/authkey.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'polyp/authkey.c') diff --git a/polyp/authkey.c b/polyp/authkey.c index 3180b8fd..bbc45c37 100644 --- a/polyp/authkey.c +++ b/polyp/authkey.c @@ -36,6 +36,7 @@ #include "authkey.h" #include "util.h" +#include "log.h" #define RANDOM_DEVICE "/dev/urandom" @@ -80,7 +81,7 @@ static int generate(const char *fn, void *data, size_t length) { } else { uint8_t *p; size_t l; - fprintf(stderr, "WARNING: Failed to open entropy device '"RANDOM_DEVICE"': %s, falling back to unsecure pseudo RNG.\n", strerror(errno)); + pa_log(__FILE__": WARNING: Failed to open entropy device '"RANDOM_DEVICE"': %s, falling back to unsecure pseudo RNG.\n", strerror(errno)); srandom(time(NULL)); @@ -122,7 +123,7 @@ int pa_authkey_load(const char *path, void *data, size_t length) { } if (ret < 0) - fprintf(stderr, "Failed to load authorization key '%s': %s\n", path, (ret == -1) ? strerror(errno) : "file corrupt"); + pa_log(__FILE__": Failed to load authorization key '%s': %s\n", path, (ret == -1) ? strerror(errno) : "file corrupt"); return ret; } -- cgit