diff options
author | Vincent Becker <vincentx.becker@intel.com> | 2011-03-18 11:23:46 +0100 |
---|---|---|
committer | Colin Guthrie <cguthrie@mandriva.org> | 2011-03-18 12:32:51 +0000 |
commit | f7acd4bdab7092700a9386802a0ec86d4362e58c (patch) | |
tree | f21aa3373c9816778fa7067682f766babfc7834f /src/pulsecore/log.h | |
parent | 26366664c140664f70d46772f0d1a790ec885410 (diff) |
log: Add a new log target to a file descriptor
This patch enables logging of text debug messages (pa_log feature) into a file or a device driver.
Example : pulseaudio --log-target=file:./mylog.txt
(Minor tweaks by Colin + Arun)
Diffstat (limited to 'src/pulsecore/log.h')
-rw-r--r-- | src/pulsecore/log.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pulsecore/log.h b/src/pulsecore/log.h index 1fd38d44..ad04e7bd 100644 --- a/src/pulsecore/log.h +++ b/src/pulsecore/log.h @@ -36,6 +36,7 @@ typedef enum pa_log_target { PA_LOG_STDERR, /* default */ PA_LOG_SYSLOG, PA_LOG_NULL, /* to /dev/null */ + PA_LOG_FD, /* to a file descriptor, e.g. a char device */ PA_LOG_TARGET_MAX } pa_log_target_t; @@ -74,6 +75,10 @@ void pa_log_set_level(pa_log_level_t l); /* Set flags */ void pa_log_set_flags(pa_log_flags_t flags, pa_log_merge_t merge); +/* Set the file descriptor of the logging device. + Daemon conf is in charge of opening this device */ +void pa_log_set_fd(int fd); + /* Enable backtrace */ void pa_log_set_show_backtrace(unsigned nlevels); |