]> code.delx.au - pulseaudio/blobdiff - src/pulsecore/log.h
merge in properties earlier to make identification of streams from hooks easier
[pulseaudio] / src / pulsecore / log.h
index 728c250132e432e085b513e69ce9e6d679ec4d77..77adb791d6d3c15480e0c369b4a0955c8ed41315 100644 (file)
@@ -1,11 +1,12 @@
 #ifndef foologhfoo
 #define foologhfoo
 
-/* $Id$ */
-
 /***
   This file is part of PulseAudio.
 
+  Copyright 2004-2006 Lennart Poettering
+  Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
+
   PulseAudio is free software; you can redistribute it and/or modify
   it under the terms of the GNU Lesser General Public License as published
   by the Free Software Foundation; either version 2 of the License,
@@ -24,7 +25,9 @@
 
 #include <stdarg.h>
 #include <stdlib.h>
-#include <pulsecore/gccmacro.h>
+
+#include <pulsecore/macro.h>
+#include <pulse/gccmacro.h>
 
 /* A simple logging subsystem */
 
@@ -48,11 +51,16 @@ typedef enum pa_log_level {
 /* Set an identification for the current daemon. Used when logging to syslog. */
 void pa_log_set_ident(const char *p);
 
+typedef void (*pa_log_func_t)(pa_log_level_t t, const char*s);
+
 /* Set another log target. If t is PA_LOG_USER you may specify a function that is called every log string */
-void pa_log_set_target(pa_log_target_t t, void (*func)(pa_log_level_t t, const char*s));
+void pa_log_set_target(pa_log_target_t t, pa_log_func_t func);
 
-/* Minimal log level */
+/* Maximal log level */
 void pa_log_set_maximal_level(pa_log_level_t l);
+void pa_log_set_show_meta(pa_bool_t b);
+void pa_log_set_show_time(pa_bool_t b);
+void pa_log_set_show_backtrace(unsigned nlevels);
 
 void pa_log_level_meta(
         pa_log_level_t level,
@@ -101,4 +109,6 @@ LOG_FUNC(error, PA_LOG_ERROR)
 
 #define pa_log pa_log_error
 
+pa_bool_t pa_log_ratelimit(void);
+
 #endif