[pulseaudio-discuss] [PATCH 1/2] add log category

Deng Zhengrong dzrongg at gmail.com
Wed Jun 6 13:17:39 PDT 2012


---
 src/daemon/caps.c                                  |    2 +
 src/daemon/cmdline.c                               |    2 +
 src/daemon/cpulimit.c                              |    2 +
 src/daemon/daemon-conf.c                           |    2 +
 src/daemon/dumpmodules.c                           |    2 +
 src/daemon/ltdl-bind-now.c                         |    2 +
 src/daemon/main.c                                  |    2 +
 src/daemon/server-lookup.c                         |    2 +
 src/modules/alsa/alsa-mixer.c                      |    2 +
 src/modules/alsa/alsa-sink.c                       |    2 +
 src/modules/alsa/alsa-source.c                     |    2 +
 src/modules/alsa/alsa-util.c                       |    4 +-
 src/modules/alsa/module-alsa-card.c                |    2 +
 src/modules/alsa/module-alsa-sink.c                |    2 +
 src/modules/alsa/module-alsa-source.c              |    2 +
 src/modules/bluetooth/bluetooth-util.c             |    2 +
 src/modules/bluetooth/module-bluetooth-device.c    |    2 +
 src/modules/bluetooth/module-bluetooth-discover.c  |    2 +
 src/modules/bluetooth/module-bluetooth-proximity.c |    2 +
 src/modules/dbus/iface-card-profile.c              |    2 +
 src/modules/dbus/iface-card.c                      |    2 +
 src/modules/dbus/iface-client.c                    |    2 +
 src/modules/dbus/iface-core.c                      |    2 +
 src/modules/dbus/iface-device-port.c               |    2 +
 src/modules/dbus/iface-device.c                    |    2 +
 src/modules/dbus/iface-memstats.c                  |    2 +
 src/modules/dbus/iface-module.c                    |    2 +
 src/modules/dbus/iface-sample.c                    |    2 +
 src/modules/dbus/iface-stream.c                    |    2 +
 src/modules/dbus/module-dbus-protocol.c            |    2 +
 src/modules/echo-cancel/echo-cancel.h              |    2 +
 src/modules/echo-cancel/webrtc.cc                  |    2 +
 src/modules/gconf/module-gconf.c                   |    2 +
 src/modules/jack/module-jack-sink.c                |    2 +
 src/modules/jack/module-jack-source.c              |    2 +
 src/modules/jack/module-jackdbus-detect.c          |    2 +
 src/modules/macosx/module-coreaudio-detect.c       |    2 +
 src/modules/module-always-sink.c                   |    2 +
 src/modules/module-augment-properties.c            |    2 +
 src/modules/module-card-restore.c                  |    2 +
 src/modules/module-cli.c                           |    2 +
 src/modules/module-combine-sink.c                  |    2 +
 src/modules/module-combine.c                       |    2 +
 src/modules/module-console-kit.c                   |    2 +
 src/modules/module-default-device-restore.c        |    2 +
 src/modules/module-detect.c                        |    2 +
 src/modules/module-device-manager.c                |    2 +
 src/modules/module-device-restore.c                |    2 +
 src/modules/module-equalizer-sink.c                |    2 +
 src/modules/module-esound-compat-spawnfd.c         |    2 +
 src/modules/module-esound-compat-spawnpid.c        |    2 +
 src/modules/module-esound-sink.c                   |    2 +
 src/modules/module-filter-apply.c                  |    2 +
 src/modules/module-filter-heuristics.c             |    2 +
 src/modules/module-hal-detect-compat.c             |    2 +
 src/modules/module-intended-roles.c                |    2 +
 src/modules/module-ladspa-sink.c                   |    2 +
 src/modules/module-lirc.c                          |    2 +
 src/modules/module-loopback.c                      |    2 +
 src/modules/module-match.c                         |    2 +
 src/modules/module-mmkbd-evdev.c                   |    2 +
 src/modules/module-native-protocol-fd.c            |    2 +
 src/modules/module-null-sink.c                     |    2 +
 src/modules/module-null-source.c                   |    2 +
 src/modules/module-pipe-sink.c                     |    2 +
 src/modules/module-pipe-source.c                   |    2 +
 src/modules/module-position-event-sounds.c         |    2 +
 src/modules/module-protocol-stub.c                 |    2 +
 src/modules/module-remap-sink.c                    |    2 +
 src/modules/module-rescue-streams.c                |    2 +
 src/modules/module-role-cork.c                     |    2 +
 src/modules/module-rygel-media-server.c            |    2 +
 src/modules/module-sine-source.c                   |    2 +
 src/modules/module-sine.c                          |    2 +
 src/modules/module-solaris.c                       |    2 +
 src/modules/module-stream-restore.c                |    2 +
 src/modules/module-suspend-on-idle.c               |    2 +
 src/modules/module-switch-on-connect.c             |    2 +
 src/modules/module-switch-on-port-available.c      |    2 +
 src/modules/module-systemd-login.c                 |    2 +
 src/modules/module-tunnel.c                        |    2 +
 src/modules/module-udev-detect.c                   |    2 +
 src/modules/module-virtual-sink.c                  |    2 +
 src/modules/module-virtual-source.c                |    2 +
 src/modules/module-virtual-surround-sink.c         |    2 +
 src/modules/module-volume-restore.c                |    2 +
 src/modules/module-waveout.c                       |    2 +
 src/modules/oss/module-oss.c                       |    2 +
 src/modules/oss/oss-util.c                         |    2 +
 src/modules/raop/module-raop-sink.c                |    2 +
 src/modules/raop/raop_client.c                     |    2 +
 src/modules/reserve-wrap.c                         |    2 +
 src/modules/rtp/headerlist.c                       |    2 +
 src/modules/rtp/module-rtp-recv.c                  |    2 +
 src/modules/rtp/module-rtp-send.c                  |    2 +
 src/modules/rtp/rtp.c                              |    2 +
 src/modules/rtp/rtsp_client.c                      |    2 +
 src/modules/rtp/sap.c                              |    2 +
 src/modules/rtp/sdp.c                              |    2 +
 src/modules/udev-util.c                            |    2 +
 src/modules/x11/module-x11-bell.c                  |    2 +
 src/modules/x11/module-x11-cork-request.c          |    2 +
 src/modules/x11/module-x11-publish.c               |    2 +
 src/modules/x11/module-x11-xsmp.c                  |    2 +
 src/modules/xen/module-xenpv-sink.c                |    2 +
 src/pulse/channelmap.c                             |    3 +
 src/pulse/client-conf-x11.c                        |    2 +
 src/pulse/client-conf.c                            |    2 +
 src/pulse/context.c                                |    2 +
 src/pulse/ext-device-manager.c                     |    2 +
 src/pulse/ext-device-restore.c                     |    2 +
 src/pulse/ext-stream-restore.c                     |    2 +
 src/pulse/format.c                                 |    2 +
 src/pulse/glib-mainloop.c                          |    2 +
 src/pulse/introspect.c                             |    2 +
 src/pulse/mainloop-api.c                           |    2 +
 src/pulse/mainloop-signal.c                        |    2 +
 src/pulse/mainloop.c                               |    2 +
 src/pulse/operation.c                              |    2 +
 src/pulse/proplist.c                               |    2 +
 src/pulse/sample.c                                 |    2 +
 src/pulse/scache.c                                 |    2 +
 src/pulse/simple.c                                 |    2 +
 src/pulse/stream.c                                 |    2 +
 src/pulse/subscribe.c                              |    2 +
 src/pulse/thread-mainloop.c                        |    2 +
 src/pulse/timeval.c                                |    2 +
 src/pulse/utf8.c                                   |    2 +
 src/pulse/util.c                                   |    2 +
 src/pulse/volume.c                                 |    2 +
 src/pulse/xmalloc.c                                |    2 +
 src/pulsecore/asyncmsgq.c                          |    2 +
 src/pulsecore/asyncq.c                             |    2 +
 src/pulsecore/aupdate.c                            |    2 +
 src/pulsecore/auth-cookie.c                        |    2 +
 src/pulsecore/authkey.c                            |    2 +
 src/pulsecore/avahi-wrap.c                         |    2 +
 src/pulsecore/bitset.c                             |    2 +
 src/pulsecore/card.c                               |    2 +
 src/pulsecore/cli-command.c                        |    2 +
 src/pulsecore/cli-text.c                           |    2 +
 src/pulsecore/cli.c                                |    2 +
 src/pulsecore/client.c                             |    2 +
 src/pulsecore/conf-parser.c                        |    2 +
 src/pulsecore/core-error.c                         |    2 +
 src/pulsecore/core-rtclock.c                       |    2 +
 src/pulsecore/core-scache.c                        |    2 +
 src/pulsecore/core-subscribe.c                     |    2 +
 src/pulsecore/core-util.c                          |    2 +
 src/pulsecore/core.c                               |    2 +
 src/pulsecore/core.h                               |    1 +
 src/pulsecore/cpu-x86.c                            |    2 +
 src/pulsecore/database-gdbm.c                      |    2 +
 src/pulsecore/database-simple.c                    |    2 +
 src/pulsecore/database-tdb.c                       |    2 +
 src/pulsecore/dbus-shared.c                        |    2 +
 src/pulsecore/dbus-util.c                          |    2 +
 src/pulsecore/device-port.c                        |    2 +
 src/pulsecore/device-port.h                        |    1 +
 src/pulsecore/dynarray.c                           |    2 +
 src/pulsecore/fdsem.c                              |    2 +
 src/pulsecore/flist.c                              |    2 +
 src/pulsecore/hashmap.c                            |    2 +
 src/pulsecore/hook-list.c                          |    2 +
 src/pulsecore/idxset.c                             |    2 +
 src/pulsecore/iochannel.c                          |    2 +
 src/pulsecore/ioline.c                             |    2 +
 src/pulsecore/ipacl.c                              |    2 +
 src/pulsecore/lock-autospawn.c                     |    2 +
 src/pulsecore/log.c                                |   79 ++++++++++++++++++-
 src/pulsecore/log.h                                |   27 +++++--
 src/pulsecore/ltdl-helper.c                        |    2 +
 src/pulsecore/mcalign.c                            |    2 +
 src/pulsecore/memblock.c                           |    2 +
 src/pulsecore/memblockq.c                          |    2 +
 src/pulsecore/memchunk.c                           |    2 +
 src/pulsecore/memtrap.c                            |    2 +
 src/pulsecore/mime-type.c                          |    2 +
 src/pulsecore/modargs.c                            |    2 +
 src/pulsecore/modinfo.c                            |    2 +
 src/pulsecore/module.c                             |    2 +
 src/pulsecore/msgobject.c                          |    2 +
 src/pulsecore/mutex-posix.c                        |    2 +
 src/pulsecore/namereg.c                            |    2 +
 src/pulsecore/object.c                             |    2 +
 src/pulsecore/once.c                               |    2 +
 src/pulsecore/packet.c                             |    2 +
 src/pulsecore/parseaddr.c                          |    2 +
 src/pulsecore/pdispatch.c                          |    2 +
 src/pulsecore/pid.c                                |    2 +
 src/pulsecore/play-memblockq.c                     |    2 +
 src/pulsecore/play-memchunk.c                      |    2 +
 src/pulsecore/proplist-util.c                      |    2 +
 src/pulsecore/protocol-cli.c                       |    2 +
 src/pulsecore/protocol-dbus.c                      |    2 +
 src/pulsecore/protocol-esound.c                    |    2 +
 src/pulsecore/protocol-http.c                      |    2 +
 src/pulsecore/protocol-native.c                    |    2 +
 src/pulsecore/protocol-simple.c                    |    2 +
 src/pulsecore/pstream-util.c                       |    2 +
 src/pulsecore/pstream.c                            |    2 +
 src/pulsecore/queue.c                              |    2 +
 src/pulsecore/random.c                             |    2 +
 src/pulsecore/ratelimit.c                          |    2 +
 src/pulsecore/remap.c                              |    2 +
 src/pulsecore/remap_mmx.c                          |    2 +
 src/pulsecore/remap_sse.c                          |    2 +
 src/pulsecore/resampler.c                          |    2 +
 src/pulsecore/rtpoll.c                             |    2 +
 src/pulsecore/sample-util.c                        |    2 +
 src/pulsecore/sconv-s16le.c                        |    2 +
 src/pulsecore/sconv.c                              |    2 +
 src/pulsecore/sconv_sse.c                          |    2 +
 src/pulsecore/semaphore-posix.c                    |    2 +
 src/pulsecore/shared.c                             |    2 +
 src/pulsecore/shm.c                                |    2 +
 src/pulsecore/sink-input.c                         |    2 +
 src/pulsecore/sink-input.h                         |    1 +
 src/pulsecore/sink.c                               |    2 +
 src/pulsecore/sink.h                               |    1 +
 src/pulsecore/sioman.c                             |    2 +
 src/pulsecore/sndfile-util.c                       |    2 +
 src/pulsecore/socket-client.c                      |    2 +
 src/pulsecore/socket-server.c                      |    2 +
 src/pulsecore/socket-util.c                        |    2 +
 src/pulsecore/sound-file-stream.c                  |    2 +
 src/pulsecore/sound-file.c                         |    2 +
 src/pulsecore/source-output.c                      |    2 +
 src/pulsecore/source-output.h                      |    1 +
 src/pulsecore/source.c                             |    2 +
 src/pulsecore/source.h                             |    1 +
 src/pulsecore/start-child.c                        |    2 +
 src/pulsecore/strbuf.c                             |    2 +
 src/pulsecore/strlist.c                            |    2 +
 src/pulsecore/svolume_c.c                          |    2 +
 src/pulsecore/svolume_mmx.c                        |    2 +
 src/pulsecore/svolume_orc.c                        |    2 +
 src/pulsecore/svolume_sse.c                        |    2 +
 src/pulsecore/tagstruct.c                          |    2 +
 src/pulsecore/thread-mq.c                          |    2 +
 src/pulsecore/thread-posix.c                       |    2 +
 src/pulsecore/time-smoother.c                      |    2 +
 src/pulsecore/tokenizer.c                          |    2 +
 src/pulsecore/usergroup.c                          |    2 +
 src/pulsecore/x11prop.c                            |    2 +
 src/pulsecore/x11wrap.c                            |    2 +
 src/tests/asyncmsgq-test.c                         |    2 +
 src/tests/asyncq-test.c                            |    2 +
 src/tests/connect-stress.c                         |    2 +
 src/tests/flist-test.c                             |    2 +
 src/tests/format-test.c                            |    2 +
 src/tests/get-binary-name-test.c                   |    2 +
 src/tests/hook-list-test.c                         |    2 +
 src/tests/interpol-test.c                          |    2 +
 src/tests/ipacl-test.c                             |    2 +
 src/tests/lock-autospawn-test.c                    |    2 +
 src/tests/mainloop-test.c                          |    2 +
 src/tests/memblock-test.c                          |    2 +
 src/tests/memblockq-test.c                         |    2 +
 src/tests/mix-test.c                               |    2 +
 src/tests/once-test.c                              |    2 +
 src/tests/proplist-test.c                          |    2 +
 src/tests/queue-test.c                             |    2 +
 src/tests/remix-test.c                             |    2 +
 src/tests/resampler-test.c                         |    2 +
 src/tests/rtpoll-test.c                            |    2 +
 src/tests/rtstutter.c                              |    2 +
 src/tests/sigbus-test.c                            |    2 +
 src/tests/smoother-test.c                          |    2 +
 src/tests/stripnul.c                               |    2 +
 src/tests/thread-mainloop-test.c                   |    2 +
 src/tests/thread-test.c                            |    2 +
 src/tests/volume-test.c                            |    2 +
 src/utils/pacat.c                                  |    2 +
 src/utils/pacmd.c                                  |    2 +
 src/utils/pactl.c                                  |    2 +
 src/utils/padsp.c                                  |    2 +
 src/utils/pasuspender.c                            |    2 +
 src/utils/pax11publish.c                           |    2 +
 279 files changed, 642 insertions(+), 15 deletions(-)

diff --git a/src/daemon/caps.c b/src/daemon/caps.c
index 3759388..49a0690 100644
--- a/src/daemon/caps.c
+++ b/src/daemon/caps.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "daemon"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/daemon/cmdline.c b/src/daemon/cmdline.c
index 2c4c4b5..b0334b9 100644
--- a/src/daemon/cmdline.c
+++ b/src/daemon/cmdline.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "daemon"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/daemon/cpulimit.c b/src/daemon/cpulimit.c
index 3a97297..1129de3 100644
--- a/src/daemon/cpulimit.c
+++ b/src/daemon/cpulimit.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "daemon"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/daemon/daemon-conf.c b/src/daemon/daemon-conf.c
index dd2e7b6..39d979f 100644
--- a/src/daemon/daemon-conf.c
+++ b/src/daemon/daemon-conf.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "daemon"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/daemon/dumpmodules.c b/src/daemon/dumpmodules.c
index 009fbe5..0b93393 100644
--- a/src/daemon/dumpmodules.c
+++ b/src/daemon/dumpmodules.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "daemon"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/daemon/ltdl-bind-now.c b/src/daemon/ltdl-bind-now.c
index cab0405..1bb7ab8 100644
--- a/src/daemon/ltdl-bind-now.c
+++ b/src/daemon/ltdl-bind-now.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "daemon"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/daemon/main.c b/src/daemon/main.c
index da1e0cf..7828f8b 100644
--- a/src/daemon/main.c
+++ b/src/daemon/main.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "daemon"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/daemon/server-lookup.c b/src/daemon/server-lookup.c
index 9bdc699..a0b4234 100644
--- a/src/daemon/server-lookup.c
+++ b/src/daemon/server-lookup.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "daemon"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
index 8b54f75..b0f7342 100644
--- a/src/modules/alsa/alsa-mixer.c
+++ b/src/modules/alsa/alsa-mixer.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-alsa-mixer"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
index 1bee8f3..0da3dd9 100644
--- a/src/modules/alsa/alsa-sink.c
+++ b/src/modules/alsa/alsa-sink.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-alsa-sink"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/alsa/alsa-source.c b/src/modules/alsa/alsa-source.c
index dfad817..8cb8120 100644
--- a/src/modules/alsa/alsa-source.c
+++ b/src/modules/alsa/alsa-source.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-alsa-source"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/alsa/alsa-util.c b/src/modules/alsa/alsa-util.c
index fbdf476..065d92d 100644
--- a/src/modules/alsa/alsa-util.c
+++ b/src/modules/alsa/alsa-util.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-alsa-util"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
@@ -835,7 +837,7 @@ static void alsa_error_handler(const char *file, int line, const char *function,
 
     va_start(ap, fmt);
 
-    pa_log_levelv_meta(PA_LOG_INFO, alsa_file, line, function, fmt, ap);
+    pa_log_levelv_meta(PA_LOG_CATEGORY_DEFAULT, PA_LOG_INFO, alsa_file, line, function, fmt, ap);
 
     va_end(ap);
 
diff --git a/src/modules/alsa/module-alsa-card.c b/src/modules/alsa/module-alsa-card.c
index b06394d..0249338 100644
--- a/src/modules/alsa/module-alsa-card.c
+++ b/src/modules/alsa/module-alsa-card.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-alsa-card"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/alsa/module-alsa-sink.c b/src/modules/alsa/module-alsa-sink.c
index 927f075..ca144ad 100644
--- a/src/modules/alsa/module-alsa-sink.c
+++ b/src/modules/alsa/module-alsa-sink.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-alsa-sink"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/alsa/module-alsa-source.c b/src/modules/alsa/module-alsa-source.c
index efb2d0c..e074027 100644
--- a/src/modules/alsa/module-alsa-source.c
+++ b/src/modules/alsa/module-alsa-source.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-alsa-source"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/bluetooth/bluetooth-util.c b/src/modules/bluetooth/bluetooth-util.c
index b786502..4f32b74 100644
--- a/src/modules/bluetooth/bluetooth-util.c
+++ b/src/modules/bluetooth/bluetooth-util.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-bluetooth-util"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c
index 68c4efc..97856f0 100644
--- a/src/modules/bluetooth/module-bluetooth-device.c
+++ b/src/modules/bluetooth/module-bluetooth-device.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-bluetooth-device"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/bluetooth/module-bluetooth-discover.c b/src/modules/bluetooth/module-bluetooth-discover.c
index e96a4f3..d8c2707 100644
--- a/src/modules/bluetooth/module-bluetooth-discover.c
+++ b/src/modules/bluetooth/module-bluetooth-discover.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-bluetooth-discover"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/bluetooth/module-bluetooth-proximity.c b/src/modules/bluetooth/module-bluetooth-proximity.c
index 3247017..406a8c5 100644
--- a/src/modules/bluetooth/module-bluetooth-proximity.c
+++ b/src/modules/bluetooth/module-bluetooth-proximity.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-bluetooth-proximity"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/dbus/iface-card-profile.c b/src/modules/dbus/iface-card-profile.c
index 004e2e8..5e03a39 100644
--- a/src/modules/dbus/iface-card-profile.c
+++ b/src/modules/dbus/iface-card-profile.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-dbus"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/dbus/iface-card.c b/src/modules/dbus/iface-card.c
index d99c8b9..e8e4b15 100644
--- a/src/modules/dbus/iface-card.c
+++ b/src/modules/dbus/iface-card.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-dbus"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/dbus/iface-client.c b/src/modules/dbus/iface-client.c
index e667544..d33f0c9 100644
--- a/src/modules/dbus/iface-client.c
+++ b/src/modules/dbus/iface-client.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-dbus"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/dbus/iface-core.c b/src/modules/dbus/iface-core.c
index 97a46a5..2ccc759 100644
--- a/src/modules/dbus/iface-core.c
+++ b/src/modules/dbus/iface-core.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-dbus"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/dbus/iface-device-port.c b/src/modules/dbus/iface-device-port.c
index d403b6a..437b5f4 100644
--- a/src/modules/dbus/iface-device-port.c
+++ b/src/modules/dbus/iface-device-port.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-dbus"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/dbus/iface-device.c b/src/modules/dbus/iface-device.c
index a5af730..32ec45c 100644
--- a/src/modules/dbus/iface-device.c
+++ b/src/modules/dbus/iface-device.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-dbus"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/dbus/iface-memstats.c b/src/modules/dbus/iface-memstats.c
index 4cd692d..7a7b245 100644
--- a/src/modules/dbus/iface-memstats.c
+++ b/src/modules/dbus/iface-memstats.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-dbus"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/dbus/iface-module.c b/src/modules/dbus/iface-module.c
index 9973166..af6c862 100644
--- a/src/modules/dbus/iface-module.c
+++ b/src/modules/dbus/iface-module.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-dbus"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/dbus/iface-sample.c b/src/modules/dbus/iface-sample.c
index 93d4fc8..e1ab3e0 100644
--- a/src/modules/dbus/iface-sample.c
+++ b/src/modules/dbus/iface-sample.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-dbus"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/dbus/iface-stream.c b/src/modules/dbus/iface-stream.c
index c6dc1c9..0755e3d 100644
--- a/src/modules/dbus/iface-stream.c
+++ b/src/modules/dbus/iface-stream.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-dbus"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/dbus/module-dbus-protocol.c b/src/modules/dbus/module-dbus-protocol.c
index c24e1e0..7174c2a 100644
--- a/src/modules/dbus/module-dbus-protocol.c
+++ b/src/modules/dbus/module-dbus-protocol.c
@@ -21,6 +21,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-dbus"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/echo-cancel/echo-cancel.h b/src/modules/echo-cancel/echo-cancel.h
index 870d163..f569b0c 100644
--- a/src/modules/echo-cancel/echo-cancel.h
+++ b/src/modules/echo-cancel/echo-cancel.h
@@ -22,6 +22,8 @@
 #ifndef fooechocancelhfoo
 #define fooechocancelhfoo
 
+#define PA_LOG_CATEGORY_DEFAULT "module-echo-cancel"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/echo-cancel/webrtc.cc b/src/modules/echo-cancel/webrtc.cc
index c4ec7da..7182859 100644
--- a/src/modules/echo-cancel/webrtc.cc
+++ b/src/modules/echo-cancel/webrtc.cc
@@ -21,6 +21,8 @@
     USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/gconf/module-gconf.c b/src/modules/gconf/module-gconf.c
index 3bad911..6d894d6 100644
--- a/src/modules/gconf/module-gconf.c
+++ b/src/modules/gconf/module-gconf.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-gconf"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/jack/module-jack-sink.c b/src/modules/jack/module-jack-sink.c
index 017fbf6..b00d973 100644
--- a/src/modules/jack/module-jack-sink.c
+++ b/src/modules/jack/module-jack-sink.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-jack-sink"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/jack/module-jack-source.c b/src/modules/jack/module-jack-source.c
index cf62882..51a4985 100644
--- a/src/modules/jack/module-jack-source.c
+++ b/src/modules/jack/module-jack-source.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-jack-source"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/jack/module-jackdbus-detect.c b/src/modules/jack/module-jackdbus-detect.c
index 41933c7..77ce4c4 100644
--- a/src/modules/jack/module-jackdbus-detect.c
+++ b/src/modules/jack/module-jackdbus-detect.c
@@ -23,6 +23,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-jackdbus-detect"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/macosx/module-coreaudio-detect.c b/src/modules/macosx/module-coreaudio-detect.c
index f4f2ee2..ca503a7 100644
--- a/src/modules/macosx/module-coreaudio-detect.c
+++ b/src/modules/macosx/module-coreaudio-detect.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-coreaudio-detect"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-always-sink.c b/src/modules/module-always-sink.c
index 0df4890..fd2dbea 100644
--- a/src/modules/module-always-sink.c
+++ b/src/modules/module-always-sink.c
@@ -19,6 +19,8 @@
     USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-always-sink"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-augment-properties.c b/src/modules/module-augment-properties.c
index 05f6f0a..536d195 100644
--- a/src/modules/module-augment-properties.c
+++ b/src/modules/module-augment-properties.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-augment-properties"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-card-restore.c b/src/modules/module-card-restore.c
index e90e610..a0c1be0 100644
--- a/src/modules/module-card-restore.c
+++ b/src/modules/module-card-restore.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-card-restore"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-cli.c b/src/modules/module-cli.c
index 2a1d175..7e73445 100644
--- a/src/modules/module-cli.c
+++ b/src/modules/module-cli.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-cli"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-combine-sink.c b/src/modules/module-combine-sink.c
index dec2279..832cf07 100644
--- a/src/modules/module-combine-sink.c
+++ b/src/modules/module-combine-sink.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-combine-sink"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-combine.c b/src/modules/module-combine.c
index 251df49..74db0d7 100644
--- a/src/modules/module-combine.c
+++ b/src/modules/module-combine.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-combine"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-console-kit.c b/src/modules/module-console-kit.c
index 29f7e66..3cfdada 100644
--- a/src/modules/module-console-kit.c
+++ b/src/modules/module-console-kit.c
@@ -19,6 +19,8 @@
     USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-console-kit"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-default-device-restore.c b/src/modules/module-default-device-restore.c
index 73a4c48..37deb73 100644
--- a/src/modules/module-default-device-restore.c
+++ b/src/modules/module-default-device-restore.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-default-device-restore"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-detect.c b/src/modules/module-detect.c
index bb4994c..70faf3e 100644
--- a/src/modules/module-detect.c
+++ b/src/modules/module-detect.c
@@ -21,6 +21,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-detect"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-device-manager.c b/src/modules/module-device-manager.c
index fe48d4f..5cfcec5 100644
--- a/src/modules/module-device-manager.c
+++ b/src/modules/module-device-manager.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-device-manager"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-device-restore.c b/src/modules/module-device-restore.c
index b9bd498..41f713c 100644
--- a/src/modules/module-device-restore.c
+++ b/src/modules/module-device-restore.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-device-restore"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-equalizer-sink.c b/src/modules/module-equalizer-sink.c
index adaef69..800649b 100644
--- a/src/modules/module-equalizer-sink.c
+++ b/src/modules/module-equalizer-sink.c
@@ -26,6 +26,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-equalizer-sink"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-esound-compat-spawnfd.c b/src/modules/module-esound-compat-spawnfd.c
index e2488fc..9dfe2af 100644
--- a/src/modules/module-esound-compat-spawnfd.c
+++ b/src/modules/module-esound-compat-spawnfd.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-esound-compat-spawnfd"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-esound-compat-spawnpid.c b/src/modules/module-esound-compat-spawnpid.c
index 94ebdaa..dd5f917 100644
--- a/src/modules/module-esound-compat-spawnpid.c
+++ b/src/modules/module-esound-compat-spawnpid.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-esound-compat-spawnpid"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-esound-sink.c b/src/modules/module-esound-sink.c
index 0838716..b081ecb 100644
--- a/src/modules/module-esound-sink.c
+++ b/src/modules/module-esound-sink.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-esound-sink"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-filter-apply.c b/src/modules/module-filter-apply.c
index cd0cd8d..f96cd1a 100644
--- a/src/modules/module-filter-apply.c
+++ b/src/modules/module-filter-apply.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-filter-apply"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-filter-heuristics.c b/src/modules/module-filter-heuristics.c
index e158b95..1b684b9 100644
--- a/src/modules/module-filter-heuristics.c
+++ b/src/modules/module-filter-heuristics.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-filter-heuristics"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-hal-detect-compat.c b/src/modules/module-hal-detect-compat.c
index 14cf814..182f928 100644
--- a/src/modules/module-hal-detect-compat.c
+++ b/src/modules/module-hal-detect-compat.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-hal-detect-compat"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-intended-roles.c b/src/modules/module-intended-roles.c
index d1e9b81..bf38e3d 100644
--- a/src/modules/module-intended-roles.c
+++ b/src/modules/module-intended-roles.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-intended-roles"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-ladspa-sink.c b/src/modules/module-ladspa-sink.c
index be05715..f64cb13 100644
--- a/src/modules/module-ladspa-sink.c
+++ b/src/modules/module-ladspa-sink.c
@@ -22,6 +22,8 @@
 /* TODO: Some plugins cause latency, and some even report it by using a control
    out port. We don't currently use the latency information. */
 
+#define PA_LOG_CATEGORY_DEFAULT "module-ladspa-sink"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-lirc.c b/src/modules/module-lirc.c
index 15f3442..2e3d0a9 100644
--- a/src/modules/module-lirc.c
+++ b/src/modules/module-lirc.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-lirc"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-loopback.c b/src/modules/module-loopback.c
index 1a69445..979f72b 100644
--- a/src/modules/module-loopback.c
+++ b/src/modules/module-loopback.c
@@ -20,6 +20,8 @@
     USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module_loopback"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-match.c b/src/modules/module-match.c
index c94ef79..43b06d1 100644
--- a/src/modules/module-match.c
+++ b/src/modules/module-match.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-match"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-mmkbd-evdev.c b/src/modules/module-mmkbd-evdev.c
index 4e89aed..877999b 100644
--- a/src/modules/module-mmkbd-evdev.c
+++ b/src/modules/module-mmkbd-evdev.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-mmkbd-evdev"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-native-protocol-fd.c b/src/modules/module-native-protocol-fd.c
index 7021a26..2738bee 100644
--- a/src/modules/module-native-protocol-fd.c
+++ b/src/modules/module-native-protocol-fd.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-native-protocol-fd"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-null-sink.c b/src/modules/module-null-sink.c
index f40546a..0cc5b14 100644
--- a/src/modules/module-null-sink.c
+++ b/src/modules/module-null-sink.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-null-sink"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-null-source.c b/src/modules/module-null-source.c
index b3ece7b..6ab5ed7 100644
--- a/src/modules/module-null-source.c
+++ b/src/modules/module-null-source.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-null-source"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-pipe-sink.c b/src/modules/module-pipe-sink.c
index ef18fad..1834c6a 100644
--- a/src/modules/module-pipe-sink.c
+++ b/src/modules/module-pipe-sink.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-pipe-sink"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-pipe-source.c b/src/modules/module-pipe-source.c
index 7a7dfb2..56e4e2d 100644
--- a/src/modules/module-pipe-source.c
+++ b/src/modules/module-pipe-source.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-pipe-source"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-position-event-sounds.c b/src/modules/module-position-event-sounds.c
index ce37588..eb0cf23 100644
--- a/src/modules/module-position-event-sounds.c
+++ b/src/modules/module-position-event-sounds.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-position-event-sounds"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-protocol-stub.c b/src/modules/module-protocol-stub.c
index dbc1917..f7ecab6 100644
--- a/src/modules/module-protocol-stub.c
+++ b/src/modules/module-protocol-stub.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-protocol-stub"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-remap-sink.c b/src/modules/module-remap-sink.c
index 2822a7f..dba6a54 100644
--- a/src/modules/module-remap-sink.c
+++ b/src/modules/module-remap-sink.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-remap-sink"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-rescue-streams.c b/src/modules/module-rescue-streams.c
index 8b35809..ba52fa0 100644
--- a/src/modules/module-rescue-streams.c
+++ b/src/modules/module-rescue-streams.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-rescue-streams"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-role-cork.c b/src/modules/module-role-cork.c
index a4270a4..0245e7c 100644
--- a/src/modules/module-role-cork.c
+++ b/src/modules/module-role-cork.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-role-cork"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-rygel-media-server.c b/src/modules/module-rygel-media-server.c
index 94b2d68..9ac5101 100644
--- a/src/modules/module-rygel-media-server.c
+++ b/src/modules/module-rygel-media-server.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-rygel-media-server"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-sine-source.c b/src/modules/module-sine-source.c
index 20a6868..467407f 100644
--- a/src/modules/module-sine-source.c
+++ b/src/modules/module-sine-source.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-sine-source"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-sine.c b/src/modules/module-sine.c
index c6d7303..96af7c0 100644
--- a/src/modules/module-sine.c
+++ b/src/modules/module-sine.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-sine"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-solaris.c b/src/modules/module-solaris.c
index 5081ceb..f4a0695 100644
--- a/src/modules/module-solaris.c
+++ b/src/modules/module-solaris.c
@@ -21,6 +21,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-solaris"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-stream-restore.c b/src/modules/module-stream-restore.c
index 228f902..4a99be4 100644
--- a/src/modules/module-stream-restore.c
+++ b/src/modules/module-stream-restore.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-stream-restore"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-suspend-on-idle.c b/src/modules/module-suspend-on-idle.c
index e1f6043..42b23cf 100644
--- a/src/modules/module-suspend-on-idle.c
+++ b/src/modules/module-suspend-on-idle.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-suspend-on-idle"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-switch-on-connect.c b/src/modules/module-switch-on-connect.c
index efe1270..fade992 100644
--- a/src/modules/module-switch-on-connect.c
+++ b/src/modules/module-switch-on-connect.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-switch-on-connect"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-switch-on-port-available.c b/src/modules/module-switch-on-port-available.c
index f198e44..45afb57 100644
--- a/src/modules/module-switch-on-port-available.c
+++ b/src/modules/module-switch-on-port-available.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-switch-on-port-available"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-systemd-login.c b/src/modules/module-systemd-login.c
index 024c1eb..3cc5dea 100644
--- a/src/modules/module-systemd-login.c
+++ b/src/modules/module-systemd-login.c
@@ -19,6 +19,8 @@
     USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-systemd-login"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-tunnel.c b/src/modules/module-tunnel.c
index 554eecf..8b02a39 100644
--- a/src/modules/module-tunnel.c
+++ b/src/modules/module-tunnel.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-tunnel"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-udev-detect.c b/src/modules/module-udev-detect.c
index 31416bd..3231765 100644
--- a/src/modules/module-udev-detect.c
+++ b/src/modules/module-udev-detect.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-udev-detect"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-virtual-sink.c b/src/modules/module-virtual-sink.c
index cf11ffa..99d0c85 100644
--- a/src/modules/module-virtual-sink.c
+++ b/src/modules/module-virtual-sink.c
@@ -20,6 +20,8 @@
     USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-virtual-sink"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-virtual-source.c b/src/modules/module-virtual-source.c
index bf07580..e135d79 100644
--- a/src/modules/module-virtual-source.c
+++ b/src/modules/module-virtual-source.c
@@ -20,6 +20,8 @@
     USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-virtual-source"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-virtual-surround-sink.c b/src/modules/module-virtual-surround-sink.c
index e13d92a..b1e0cb7 100644
--- a/src/modules/module-virtual-surround-sink.c
+++ b/src/modules/module-virtual-surround-sink.c
@@ -21,6 +21,8 @@
     USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-virtual-surround-sink"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-volume-restore.c b/src/modules/module-volume-restore.c
index a344c5e..9aea1b9 100644
--- a/src/modules/module-volume-restore.c
+++ b/src/modules/module-volume-restore.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-volume-restore"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/module-waveout.c b/src/modules/module-waveout.c
index 53efce9..ea76991 100644
--- a/src/modules/module-waveout.c
+++ b/src/modules/module-waveout.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-waveout"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/oss/module-oss.c b/src/modules/oss/module-oss.c
index 6f0f271..d1ea248 100644
--- a/src/modules/oss/module-oss.c
+++ b/src/modules/oss/module-oss.c
@@ -34,6 +34,8 @@
  *
  */
 
+#define PA_LOG_CATEGORY_DEFAULT "module_oss"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/oss/oss-util.c b/src/modules/oss/oss-util.c
index 9412a87..6a311b3 100644
--- a/src/modules/oss/oss-util.c
+++ b/src/modules/oss/oss-util.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module_oss"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/raop/module-raop-sink.c b/src/modules/raop/module-raop-sink.c
index 2cb7a95..8aecbd1 100644
--- a/src/modules/raop/module-raop-sink.c
+++ b/src/modules/raop/module-raop-sink.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-raop-sink"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/raop/raop_client.c b/src/modules/raop/raop_client.c
index bbbce5b..35797c0 100644
--- a/src/modules/raop/raop_client.c
+++ b/src/modules/raop/raop_client.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-raop"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/reserve-wrap.c b/src/modules/reserve-wrap.c
index 1411d27..4e027a6 100644
--- a/src/modules/reserve-wrap.c
+++ b/src/modules/reserve-wrap.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-reserve-wrap"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/rtp/headerlist.c b/src/modules/rtp/headerlist.c
index 0fef835..426a0cd 100644
--- a/src/modules/rtp/headerlist.c
+++ b/src/modules/rtp/headerlist.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module_rtp"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/rtp/module-rtp-recv.c b/src/modules/rtp/module-rtp-recv.c
index 412f4c3..5f1087d 100644
--- a/src/modules/rtp/module-rtp-recv.c
+++ b/src/modules/rtp/module-rtp-recv.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module_rtp"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/rtp/module-rtp-send.c b/src/modules/rtp/module-rtp-send.c
index 6502664..c7fa8b2 100644
--- a/src/modules/rtp/module-rtp-send.c
+++ b/src/modules/rtp/module-rtp-send.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module_rtp"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/rtp/rtp.c b/src/modules/rtp/rtp.c
index 178717c..22fe5a8 100644
--- a/src/modules/rtp/rtp.c
+++ b/src/modules/rtp/rtp.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module_rtp"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/rtp/rtsp_client.c b/src/modules/rtp/rtsp_client.c
index 71692c2..cd40bcc 100644
--- a/src/modules/rtp/rtsp_client.c
+++ b/src/modules/rtp/rtsp_client.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module_rtp"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/rtp/sap.c b/src/modules/rtp/sap.c
index 4d8bf66..613a255 100644
--- a/src/modules/rtp/sap.c
+++ b/src/modules/rtp/sap.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module_rtp"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/rtp/sdp.c b/src/modules/rtp/sdp.c
index 3e61d9b..a62677a 100644
--- a/src/modules/rtp/sdp.c
+++ b/src/modules/rtp/sdp.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module_rtp"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/udev-util.c b/src/modules/udev-util.c
index b0bb17d..0e6051f 100644
--- a/src/modules/udev-util.c
+++ b/src/modules/udev-util.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-udev-util"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/x11/module-x11-bell.c b/src/modules/x11/module-x11-bell.c
index 37ab2e7..20da3ed 100644
--- a/src/modules/x11/module-x11-bell.c
+++ b/src/modules/x11/module-x11-bell.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-x11-bell"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/x11/module-x11-cork-request.c b/src/modules/x11/module-x11-cork-request.c
index 0e67db0..34dd3d3 100644
--- a/src/modules/x11/module-x11-cork-request.c
+++ b/src/modules/x11/module-x11-cork-request.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-x11-cork-request"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/x11/module-x11-publish.c b/src/modules/x11/module-x11-publish.c
index 643b735..77aa293 100644
--- a/src/modules/x11/module-x11-publish.c
+++ b/src/modules/x11/module-x11-publish.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-x11-publish"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/x11/module-x11-xsmp.c b/src/modules/x11/module-x11-xsmp.c
index 765eff0..80f3261 100644
--- a/src/modules/x11/module-x11-xsmp.c
+++ b/src/modules/x11/module-x11-xsmp.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-x11-xsmp"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/modules/xen/module-xenpv-sink.c b/src/modules/xen/module-xenpv-sink.c
index 086917c..6d9891d 100644
--- a/src/modules/xen/module-xenpv-sink.c
+++ b/src/modules/xen/module-xenpv-sink.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "module-xenpv-sink"
+
 #include "config.h"
 
 #include <stdlib.h>
diff --git a/src/pulse/channelmap.c b/src/pulse/channelmap.c
index 0d199f3..bcd682e 100644
--- a/src/pulse/channelmap.c
+++ b/src/pulse/channelmap.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_PULSE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
@@ -35,6 +37,7 @@
 #include <pulsecore/macro.h>
 #include <pulsecore/bitset.h>
 #include <pulsecore/sample-util.h>
+#include <pulsecore/log.h>
 
 #include "channelmap.h"
 
diff --git a/src/pulse/client-conf-x11.c b/src/pulse/client-conf-x11.c
index 76b9f6f..34d7f3d 100644
--- a/src/pulse/client-conf-x11.c
+++ b/src/pulse/client-conf-x11.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulse/client-conf.c b/src/pulse/client-conf.c
index 781fdf9..eb90094 100644
--- a/src/pulse/client-conf.c
+++ b/src/pulse/client-conf.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_PULSE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulse/context.c b/src/pulse/context.c
index 4618635..fbfc0d5 100644
--- a/src/pulse/context.c
+++ b/src/pulse/context.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_PULSE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulse/ext-device-manager.c b/src/pulse/ext-device-manager.c
index f2ea63a..4b69bc2 100644
--- a/src/pulse/ext-device-manager.c
+++ b/src/pulse/ext-device-manager.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_PULSE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulse/ext-device-restore.c b/src/pulse/ext-device-restore.c
index 25d33d1..f964a64 100644
--- a/src/pulse/ext-device-restore.c
+++ b/src/pulse/ext-device-restore.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_PULSE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulse/ext-stream-restore.c b/src/pulse/ext-stream-restore.c
index 1f72c1c..ddb0382 100644
--- a/src/pulse/ext-stream-restore.c
+++ b/src/pulse/ext-stream-restore.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_PULSE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulse/format.c b/src/pulse/format.c
index 542d119..5d97bb4 100644
--- a/src/pulse/format.c
+++ b/src/pulse/format.c
@@ -21,6 +21,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_PULSE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulse/glib-mainloop.c b/src/pulse/glib-mainloop.c
index 35c9c6a..bab3b97 100644
--- a/src/pulse/glib-mainloop.c
+++ b/src/pulse/glib-mainloop.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_PULSE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulse/introspect.c b/src/pulse/introspect.c
index 38a9d1c..6cea2cb 100644
--- a/src/pulse/introspect.c
+++ b/src/pulse/introspect.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_PULSE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulse/mainloop-api.c b/src/pulse/mainloop-api.c
index 45539cc..56956ce 100644
--- a/src/pulse/mainloop-api.c
+++ b/src/pulse/mainloop-api.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_PULSE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulse/mainloop-signal.c b/src/pulse/mainloop-signal.c
index 9482fe3..0f397d0 100644
--- a/src/pulse/mainloop-signal.c
+++ b/src/pulse/mainloop-signal.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_PULSE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulse/mainloop.c b/src/pulse/mainloop.c
index 5c0345e..4e1de36 100644
--- a/src/pulse/mainloop.c
+++ b/src/pulse/mainloop.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_PULSE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulse/operation.c b/src/pulse/operation.c
index fe160a3..4bd975e 100644
--- a/src/pulse/operation.c
+++ b/src/pulse/operation.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_PULSE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulse/proplist.c b/src/pulse/proplist.c
index 649138c..fbd1f83 100644
--- a/src/pulse/proplist.c
+++ b/src/pulse/proplist.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_PULSE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulse/sample.c b/src/pulse/sample.c
index b613612..ea79e6a 100644
--- a/src/pulse/sample.c
+++ b/src/pulse/sample.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_PULSE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulse/scache.c b/src/pulse/scache.c
index 3fad82a..35170ea 100644
--- a/src/pulse/scache.c
+++ b/src/pulse/scache.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_PULSE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulse/simple.c b/src/pulse/simple.c
index 3524296..0ba6a8e 100644
--- a/src/pulse/simple.c
+++ b/src/pulse/simple.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_PULSE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulse/stream.c b/src/pulse/stream.c
index 39338c1..87f54f9 100644
--- a/src/pulse/stream.c
+++ b/src/pulse/stream.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_PULSE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulse/subscribe.c b/src/pulse/subscribe.c
index a6ad238..b3a19d4 100644
--- a/src/pulse/subscribe.c
+++ b/src/pulse/subscribe.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_PULSE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulse/thread-mainloop.c b/src/pulse/thread-mainloop.c
index aa56a92..572215a 100644
--- a/src/pulse/thread-mainloop.c
+++ b/src/pulse/thread-mainloop.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_PULSE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulse/timeval.c b/src/pulse/timeval.c
index a394dbe..69200c5 100644
--- a/src/pulse/timeval.c
+++ b/src/pulse/timeval.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_PULSE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulse/utf8.c b/src/pulse/utf8.c
index 773a1f8..dc1aed9 100644
--- a/src/pulse/utf8.c
+++ b/src/pulse/utf8.c
@@ -44,6 +44,8 @@
  * Boston, MA 02111-1307, USA.
  */
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_PULSE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulse/util.c b/src/pulse/util.c
index 6656bc3..8b1c980 100644
--- a/src/pulse/util.c
+++ b/src/pulse/util.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_PULSE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulse/volume.c b/src/pulse/volume.c
index cf0a226..dcf99b4 100644
--- a/src/pulse/volume.c
+++ b/src/pulse/volume.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_PULSE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulse/xmalloc.c b/src/pulse/xmalloc.c
index e17a354..38aa611 100644
--- a/src/pulse/xmalloc.c
+++ b/src/pulse/xmalloc.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_PULSE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/asyncmsgq.c b/src/pulsecore/asyncmsgq.c
index 408416c..dcc5e22 100644
--- a/src/pulsecore/asyncmsgq.c
+++ b/src/pulsecore/asyncmsgq.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_PULSE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/asyncq.c b/src/pulsecore/asyncq.c
index 8c2d58a..744559d 100644
--- a/src/pulsecore/asyncq.c
+++ b/src/pulsecore/asyncq.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/aupdate.c b/src/pulsecore/aupdate.c
index 85b6e00..64e161c 100644
--- a/src/pulsecore/aupdate.c
+++ b/src/pulsecore/aupdate.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/auth-cookie.c b/src/pulsecore/auth-cookie.c
index 97ea351..90120fe 100644
--- a/src/pulsecore/auth-cookie.c
+++ b/src/pulsecore/auth-cookie.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/authkey.c b/src/pulsecore/authkey.c
index c37d3fe..b9bd883 100644
--- a/src/pulsecore/authkey.c
+++ b/src/pulsecore/authkey.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/avahi-wrap.c b/src/pulsecore/avahi-wrap.c
index 997d81f..89f3787 100644
--- a/src/pulsecore/avahi-wrap.c
+++ b/src/pulsecore/avahi-wrap.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/bitset.c b/src/pulsecore/bitset.c
index 4b62fc4..13c8105 100644
--- a/src/pulsecore/bitset.c
+++ b/src/pulsecore/bitset.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/card.c b/src/pulsecore/card.c
index 1d0a9ea..91391a3 100644
--- a/src/pulsecore/card.c
+++ b/src/pulsecore/card.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/cli-command.c b/src/pulsecore/cli-command.c
index fc9465b..0f7b634 100644
--- a/src/pulsecore/cli-command.c
+++ b/src/pulsecore/cli-command.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/cli-text.c b/src/pulsecore/cli-text.c
index d234b96..bdf1d7f 100644
--- a/src/pulsecore/cli-text.c
+++ b/src/pulsecore/cli-text.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/cli.c b/src/pulsecore/cli.c
index 53aa651..a464ff9 100644
--- a/src/pulsecore/cli.c
+++ b/src/pulsecore/cli.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/client.c b/src/pulsecore/client.c
index c956b10..37064d9 100644
--- a/src/pulsecore/client.c
+++ b/src/pulsecore/client.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/conf-parser.c b/src/pulsecore/conf-parser.c
index 7152955..70b3f19 100644
--- a/src/pulsecore/conf-parser.c
+++ b/src/pulsecore/conf-parser.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/core-error.c b/src/pulsecore/core-error.c
index 4d930a0..8eea8a0 100644
--- a/src/pulsecore/core-error.c
+++ b/src/pulsecore/core-error.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/core-rtclock.c b/src/pulsecore/core-rtclock.c
index 6632cc6..5cfad96 100644
--- a/src/pulsecore/core-rtclock.c
+++ b/src/pulsecore/core-rtclock.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/core-scache.c b/src/pulsecore/core-scache.c
index 73f65d2..23ee6bf 100644
--- a/src/pulsecore/core-scache.c
+++ b/src/pulsecore/core-scache.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/core-subscribe.c b/src/pulsecore/core-subscribe.c
index 4f98eb4..786c298 100644
--- a/src/pulsecore/core-subscribe.c
+++ b/src/pulsecore/core-subscribe.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c
index 82480c6..5ce8857 100644
--- a/src/pulsecore/core-util.c
+++ b/src/pulsecore/core-util.c
@@ -21,6 +21,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/core.c b/src/pulsecore/core.c
index e4f9140..a3ee0d2 100644
--- a/src/pulsecore/core.c
+++ b/src/pulsecore/core.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/core.h b/src/pulsecore/core.h
index ba21fa9..05a46f6 100644
--- a/src/pulsecore/core.h
+++ b/src/pulsecore/core.h
@@ -184,6 +184,7 @@ struct pa_core {
 };
 
 PA_DECLARE_PUBLIC_CLASS(pa_core);
+
 #define PA_CORE(o) pa_core_cast(o)
 
 enum {
diff --git a/src/pulsecore/cpu-x86.c b/src/pulsecore/cpu-x86.c
index 05a4b2f..ba03e76 100644
--- a/src/pulsecore/cpu-x86.c
+++ b/src/pulsecore/cpu-x86.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/database-gdbm.c b/src/pulsecore/database-gdbm.c
index c4a7ccb..da23eca 100644
--- a/src/pulsecore/database-gdbm.c
+++ b/src/pulsecore/database-gdbm.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/database-simple.c b/src/pulsecore/database-simple.c
index db68158..1383256 100644
--- a/src/pulsecore/database-simple.c
+++ b/src/pulsecore/database-simple.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/database-tdb.c b/src/pulsecore/database-tdb.c
index 4e782d6..8cbec28 100644
--- a/src/pulsecore/database-tdb.c
+++ b/src/pulsecore/database-tdb.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/dbus-shared.c b/src/pulsecore/dbus-shared.c
index 3477407..ed6003f 100644
--- a/src/pulsecore/dbus-shared.c
+++ b/src/pulsecore/dbus-shared.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/dbus-util.c b/src/pulsecore/dbus-util.c
index adffa88..8e4a8a5 100644
--- a/src/pulsecore/dbus-util.c
+++ b/src/pulsecore/dbus-util.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/device-port.c b/src/pulsecore/device-port.c
index 50c99b8..dd04e62 100644
--- a/src/pulsecore/device-port.c
+++ b/src/pulsecore/device-port.c
@@ -21,6 +21,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #include "device-port.h"
 #include <pulsecore/card.h>
 
diff --git a/src/pulsecore/device-port.h b/src/pulsecore/device-port.h
index 4e90a62..8f56479 100644
--- a/src/pulsecore/device-port.h
+++ b/src/pulsecore/device-port.h
@@ -56,6 +56,7 @@ struct pa_device_port {
 };
 
 PA_DECLARE_PUBLIC_CLASS(pa_device_port);
+
 #define PA_DEVICE_PORT(s) (pa_device_port_cast(s))
 
 #define PA_DEVICE_PORT_DATA(d) ((void*) ((uint8_t*) d + PA_ALIGN(sizeof(pa_device_port))))
diff --git a/src/pulsecore/dynarray.c b/src/pulsecore/dynarray.c
index 78b2eb9..0d50366 100644
--- a/src/pulsecore/dynarray.c
+++ b/src/pulsecore/dynarray.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/fdsem.c b/src/pulsecore/fdsem.c
index 14fcbd6..5c37421 100644
--- a/src/pulsecore/fdsem.c
+++ b/src/pulsecore/fdsem.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/flist.c b/src/pulsecore/flist.c
index 0aa95c7..881578f 100644
--- a/src/pulsecore/flist.c
+++ b/src/pulsecore/flist.c
@@ -23,6 +23,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/hashmap.c b/src/pulsecore/hashmap.c
index e368512..ba774f2 100644
--- a/src/pulsecore/hashmap.c
+++ b/src/pulsecore/hashmap.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/hook-list.c b/src/pulsecore/hook-list.c
index 00981be..f52d89c 100644
--- a/src/pulsecore/hook-list.c
+++ b/src/pulsecore/hook-list.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/idxset.c b/src/pulsecore/idxset.c
index 2b6af90..0ca0ef3 100644
--- a/src/pulsecore/idxset.c
+++ b/src/pulsecore/idxset.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/iochannel.c b/src/pulsecore/iochannel.c
index fa3d767..981ef77 100644
--- a/src/pulsecore/iochannel.c
+++ b/src/pulsecore/iochannel.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/ioline.c b/src/pulsecore/ioline.c
index a18188d..01e86b8 100644
--- a/src/pulsecore/ioline.c
+++ b/src/pulsecore/ioline.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/ipacl.c b/src/pulsecore/ipacl.c
index 5455d0e..cd973d4 100644
--- a/src/pulsecore/ipacl.c
+++ b/src/pulsecore/ipacl.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/lock-autospawn.c b/src/pulsecore/lock-autospawn.c
index b1d414b..752cd4a 100644
--- a/src/pulsecore/lock-autospawn.c
+++ b/src/pulsecore/lock-autospawn.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/log.c b/src/pulsecore/log.c
index 8eaef54..86df681 100644
--- a/src/pulsecore/log.c
+++ b/src/pulsecore/log.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
@@ -50,6 +52,9 @@
 #include <pulsecore/once.h>
 #include <pulsecore/ratelimit.h>
 #include <pulsecore/thread.h>
+#include <pulsecore/llist.h>
+#include <pulsecore/mutex.h>
+#include <pulsecore/hashmap.h>
 
 #include "log.h"
 
@@ -64,6 +69,15 @@
 #define ENV_LOG_BACKTRACE_SKIP "PULSE_LOG_BACKTRACE_SKIP"
 #define ENV_LOG_NO_RATELIMIT "PULSE_LOG_NO_RATE_LIMIT"
 
+struct pa_log_category {
+    pa_log_level_t threshold;
+    const char *name;
+};
+
+static pa_mutex *categories_mutex = NULL;
+static pa_hashmap *categories = NULL;
+static pa_atomic_t categories_initialized = PA_ATOMIC_INIT(0);
+
 static char *ident = NULL; /* in local charset format */
 static pa_log_target_t target = PA_LOG_STDERR, target_override;
 static pa_bool_t target_override_set = FALSE;
@@ -207,11 +221,21 @@ static char* get_backtrace(unsigned show_nframes) {
 
 #endif
 
+static void init_categories(void) {
+    if (!pa_atomic_load(&categories_initialized)) {
+        categories = pa_hashmap_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func);
+        categories_mutex = pa_mutex_new(TRUE, TRUE);
+        pa_atomic_store(&categories_initialized, (int) 1);
+    }
+}
+
 static void init_defaults(void) {
     PA_ONCE_BEGIN {
 
         const char *e;
 
+        init_categories();
+
         if (!ident) {
             char binary[256];
             if (pa_get_binary_name(binary, sizeof(binary)))
@@ -265,7 +289,40 @@ static void init_defaults(void) {
     } PA_ONCE_END;
 }
 
+static pa_log_category_t *pa_log_category_create(const char *name)
+{
+    pa_log_category_t *cat = NULL;
+
+    if (!pa_atomic_load(&categories_initialized))
+        return NULL;
+
+    cat = pa_xnew0(pa_log_category_t, 1);
+    cat->threshold = 3;
+    cat->name = pa_xstrdup(name);
+
+    pa_mutex_lock(categories_mutex);
+    pa_hashmap_put(categories, cat->name, cat);
+    pa_mutex_unlock(categories_mutex);
+
+    return cat;
+}
+
+static pa_log_category_t *pa_log_category_get(const char *name)
+{
+    pa_log_category_t *cat = NULL;
+
+    if (!pa_atomic_load(&categories_initialized))
+        return NULL;
+
+    pa_mutex_lock(categories_mutex);
+    cat = pa_hashmap_get(categories, name);
+    pa_mutex_unlock(categories_mutex);
+
+    return cat;
+}
+
 void pa_log_levelv_meta(
+        const char *category_name,
         pa_log_level_t level,
         const char*file,
         int line,
@@ -280,6 +337,7 @@ void pa_log_levelv_meta(
     pa_log_level_t _maximum_level;
     unsigned _show_backtrace;
     pa_log_flags_t _flags;
+    pa_log_category_t *category;
 
     /* We don't use dynamic memory allocation here to minimize the hit
      * in RT threads */
@@ -290,6 +348,16 @@ void pa_log_levelv_meta(
 
     init_defaults();
 
+    category = pa_log_category_get(category_name);
+    if (!category)
+        category = pa_log_category_create(category_name);
+
+    if (!category)
+        return;
+
+    if (level > category->threshold)
+        return;
+
     _target = target_override_set ? target_override : target;
     _maximum_level = PA_MAX(maximum_level, maximum_level_override);
     _show_backtrace = PA_MAX(show_backtrace, show_backtrace_override);
@@ -438,6 +506,7 @@ void pa_log_levelv_meta(
 }
 
 void pa_log_level_meta(
+        const char *category,
         pa_log_level_t level,
         const char*file,
         int line,
@@ -446,19 +515,19 @@ void pa_log_level_meta(
 
     va_list ap;
     va_start(ap, format);
-    pa_log_levelv_meta(level, file, line, func, format, ap);
+    pa_log_levelv_meta(category, level, file, line, func, format, ap);
     va_end(ap);
 }
 
-void pa_log_levelv(pa_log_level_t level, const char *format, va_list ap) {
-    pa_log_levelv_meta(level, NULL, 0, NULL, format, ap);
+void pa_log_levelv(const char *category, pa_log_level_t level, const char *format, va_list ap) {
+    pa_log_levelv_meta(category, level, NULL, 0, NULL, format, ap);
 }
 
-void pa_log_level(pa_log_level_t level, const char *format, ...) {
+void pa_log_level(const char *category, pa_log_level_t level, const char *format, ...) {
     va_list ap;
 
     va_start(ap, format);
-    pa_log_levelv_meta(level, NULL, 0, NULL, format, ap);
+    pa_log_levelv_meta(category, level, NULL, 0, NULL, format, ap);
     va_end(ap);
 }
 
diff --git a/src/pulsecore/log.h b/src/pulsecore/log.h
index 8dd056b..d5432e6 100644
--- a/src/pulsecore/log.h
+++ b/src/pulsecore/log.h
@@ -31,6 +31,11 @@
 
 /* A simple logging subsystem */
 
+typedef struct pa_log_category pa_log_category_t;
+
+#define PA_LOG_CATEGORY_CORE "core"
+#define PA_LOG_CATEGORY_PULSE "pulse"
+
 /* Where to log to */
 typedef enum pa_log_target {
     PA_LOG_STDERR,  /* default */
@@ -86,13 +91,15 @@ void pa_log_set_show_backtrace(unsigned nlevels);
 void pa_log_set_skip_backtrace(unsigned nlevels);
 
 void pa_log_level_meta(
+        const char *category,
         pa_log_level_t level,
         const char*file,
         int line,
         const char *func,
-        const char *format, ...) PA_GCC_PRINTF_ATTR(5,6);
+        const char *format, ...) PA_GCC_PRINTF_ATTR(6,7);
 
 void pa_log_levelv_meta(
+        const char *category,
         pa_log_level_t level,
         const char*file,
         int line,
@@ -101,10 +108,12 @@ void pa_log_levelv_meta(
         va_list ap);
 
 void pa_log_level(
+        const char *category,
         pa_log_level_t level,
-        const char *format, ...) PA_GCC_PRINTF_ATTR(2,3);
+        const char *format, ...) PA_GCC_PRINTF_ATTR(3,4);
 
 void pa_log_levelv(
+        const char *category,
         pa_log_level_t level,
         const char *format,
         va_list ap);
@@ -113,12 +122,12 @@ void pa_log_levelv(
 
 /* ISO varargs available */
 
-#define pa_log_debug(...)  pa_log_level_meta(PA_LOG_DEBUG,  __FILE__, __LINE__, __func__, __VA_ARGS__)
-#define pa_log_info(...)   pa_log_level_meta(PA_LOG_INFO,   __FILE__, __LINE__, __func__, __VA_ARGS__)
-#define pa_log_notice(...) pa_log_level_meta(PA_LOG_NOTICE, __FILE__, __LINE__, __func__, __VA_ARGS__)
-#define pa_log_warn(...)   pa_log_level_meta(PA_LOG_WARN,   __FILE__, __LINE__, __func__, __VA_ARGS__)
-#define pa_log_error(...)  pa_log_level_meta(PA_LOG_ERROR,  __FILE__, __LINE__, __func__, __VA_ARGS__)
-#define pa_logl(level, ...)  pa_log_level_meta(level,  __FILE__, __LINE__, __func__, __VA_ARGS__)
+#define pa_log_debug(...)  pa_log_level_meta(PA_LOG_CATEGORY_DEFAULT, PA_LOG_DEBUG,  __FILE__, __LINE__, __func__, __VA_ARGS__)
+#define pa_log_info(...)   pa_log_level_meta(PA_LOG_CATEGORY_DEFAULT, PA_LOG_INFO,   __FILE__, __LINE__, __func__, __VA_ARGS__)
+#define pa_log_notice(...) pa_log_level_meta(PA_LOG_CATEGORY_DEFAULT, PA_LOG_NOTICE, __FILE__, __LINE__, __func__, __VA_ARGS__)
+#define pa_log_warn(...)   pa_log_level_meta(PA_LOG_CATEGORY_DEFAULT, PA_LOG_WARN,   __FILE__, __LINE__, __func__, __VA_ARGS__)
+#define pa_log_error(...)  pa_log_level_meta(PA_LOG_CATEGORY_DEFAULT, PA_LOG_ERROR,  __FILE__, __LINE__, __func__, __VA_ARGS__)
+#define pa_logl(level, ...)  pa_log_level_meta(PA_LOG_CATEGORY_DEFAULT, level,  __FILE__, __LINE__, __func__, __VA_ARGS__)
 
 #else
 
@@ -126,7 +135,7 @@ void pa_log_levelv(
 PA_GCC_UNUSED static void pa_log_##suffix(const char *format, ...) { \
     va_list ap; \
     va_start(ap, format); \
-    pa_log_levelv_meta(level, NULL, 0, NULL, format, ap); \
+    pa_log_levelv_meta(PA_LOG_CATEGORY_DEFAULT, level, NULL, 0, NULL, format, ap); \
     va_end(ap); \
 }
 
diff --git a/src/pulsecore/ltdl-helper.c b/src/pulsecore/ltdl-helper.c
index bdb5a5d..b609970 100644
--- a/src/pulsecore/ltdl-helper.c
+++ b/src/pulsecore/ltdl-helper.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/mcalign.c b/src/pulsecore/mcalign.c
index f5363eb..0676bfc 100644
--- a/src/pulsecore/mcalign.c
+++ b/src/pulsecore/mcalign.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/memblock.c b/src/pulsecore/memblock.c
index e30ded8..9c6040d 100644
--- a/src/pulsecore/memblock.c
+++ b/src/pulsecore/memblock.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/memblockq.c b/src/pulsecore/memblockq.c
index 18066f7..ec14335 100644
--- a/src/pulsecore/memblockq.c
+++ b/src/pulsecore/memblockq.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/memchunk.c b/src/pulsecore/memchunk.c
index cc242e4..3282b33 100644
--- a/src/pulsecore/memchunk.c
+++ b/src/pulsecore/memchunk.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/memtrap.c b/src/pulsecore/memtrap.c
index 4236934..4bcad2f 100644
--- a/src/pulsecore/memtrap.c
+++ b/src/pulsecore/memtrap.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/mime-type.c b/src/pulsecore/mime-type.c
index 09ce00b..be7a366 100644
--- a/src/pulsecore/mime-type.c
+++ b/src/pulsecore/mime-type.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/modargs.c b/src/pulsecore/modargs.c
index 555c4d0..a9e7487 100644
--- a/src/pulsecore/modargs.c
+++ b/src/pulsecore/modargs.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/modinfo.c b/src/pulsecore/modinfo.c
index 860b806..1e72fa4 100644
--- a/src/pulsecore/modinfo.c
+++ b/src/pulsecore/modinfo.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/module.c b/src/pulsecore/module.c
index 5eb3572..8dc616b 100644
--- a/src/pulsecore/module.c
+++ b/src/pulsecore/module.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/msgobject.c b/src/pulsecore/msgobject.c
index 075a28c..3fdee66 100644
--- a/src/pulsecore/msgobject.c
+++ b/src/pulsecore/msgobject.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_PULSE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/mutex-posix.c b/src/pulsecore/mutex-posix.c
index d90525b..3b37678 100644
--- a/src/pulsecore/mutex-posix.c
+++ b/src/pulsecore/mutex-posix.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/namereg.c b/src/pulsecore/namereg.c
index 334e00d..6ea8c47 100644
--- a/src/pulsecore/namereg.c
+++ b/src/pulsecore/namereg.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/object.c b/src/pulsecore/object.c
index 0dc8198..54ba874 100644
--- a/src/pulsecore/object.c
+++ b/src/pulsecore/object.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/once.c b/src/pulsecore/once.c
index 30b35a6..31647b1 100644
--- a/src/pulsecore/once.c
+++ b/src/pulsecore/once.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/packet.c b/src/pulsecore/packet.c
index cee468b..d92309b 100644
--- a/src/pulsecore/packet.c
+++ b/src/pulsecore/packet.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/parseaddr.c b/src/pulsecore/parseaddr.c
index 7ec068a..9f740e7 100644
--- a/src/pulsecore/parseaddr.c
+++ b/src/pulsecore/parseaddr.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/pdispatch.c b/src/pulsecore/pdispatch.c
index 9a9ef4e..907cbdb 100644
--- a/src/pulsecore/pdispatch.c
+++ b/src/pulsecore/pdispatch.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/pid.c b/src/pulsecore/pid.c
index 588349b..6b671c8 100644
--- a/src/pulsecore/pid.c
+++ b/src/pulsecore/pid.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/play-memblockq.c b/src/pulsecore/play-memblockq.c
index 2ce92e5..829ac93 100644
--- a/src/pulsecore/play-memblockq.c
+++ b/src/pulsecore/play-memblockq.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/play-memchunk.c b/src/pulsecore/play-memchunk.c
index 26a2bcc..62ef602 100644
--- a/src/pulsecore/play-memchunk.c
+++ b/src/pulsecore/play-memchunk.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/proplist-util.c b/src/pulsecore/proplist-util.c
index f447431..bc13f0b 100644
--- a/src/pulsecore/proplist-util.c
+++ b/src/pulsecore/proplist-util.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/protocol-cli.c b/src/pulsecore/protocol-cli.c
index da64874..6e76d33 100644
--- a/src/pulsecore/protocol-cli.c
+++ b/src/pulsecore/protocol-cli.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/protocol-dbus.c b/src/pulsecore/protocol-dbus.c
index adc1f38..f54363a 100644
--- a/src/pulsecore/protocol-dbus.c
+++ b/src/pulsecore/protocol-dbus.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/protocol-esound.c b/src/pulsecore/protocol-esound.c
index 00ea000..57ac2aa 100644
--- a/src/pulsecore/protocol-esound.c
+++ b/src/pulsecore/protocol-esound.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/protocol-http.c b/src/pulsecore/protocol-http.c
index d745634..7dff3b7 100644
--- a/src/pulsecore/protocol-http.c
+++ b/src/pulsecore/protocol-http.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c
index a698f74..7d90fb7 100644
--- a/src/pulsecore/protocol-native.c
+++ b/src/pulsecore/protocol-native.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/protocol-simple.c b/src/pulsecore/protocol-simple.c
index 8d8f5b8..16c31fe 100644
--- a/src/pulsecore/protocol-simple.c
+++ b/src/pulsecore/protocol-simple.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/pstream-util.c b/src/pulsecore/pstream-util.c
index f84f486..7fb8544 100644
--- a/src/pulsecore/pstream-util.c
+++ b/src/pulsecore/pstream-util.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/pstream.c b/src/pulsecore/pstream.c
index 9945797..49d6184 100644
--- a/src/pulsecore/pstream.c
+++ b/src/pulsecore/pstream.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/queue.c b/src/pulsecore/queue.c
index f4216ee..62bd040 100644
--- a/src/pulsecore/queue.c
+++ b/src/pulsecore/queue.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/random.c b/src/pulsecore/random.c
index b2ec19f..8cd0f8c 100644
--- a/src/pulsecore/random.c
+++ b/src/pulsecore/random.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/ratelimit.c b/src/pulsecore/ratelimit.c
index a274d2c..0895f2d 100644
--- a/src/pulsecore/ratelimit.c
+++ b/src/pulsecore/ratelimit.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/remap.c b/src/pulsecore/remap.c
index b831f78..0aa5510 100644
--- a/src/pulsecore/remap.c
+++ b/src/pulsecore/remap.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/remap_mmx.c b/src/pulsecore/remap_mmx.c
index 9a69ada..9ac998e 100644
--- a/src/pulsecore/remap_mmx.c
+++ b/src/pulsecore/remap_mmx.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/remap_sse.c b/src/pulsecore/remap_sse.c
index 8344a27..12b6121 100644
--- a/src/pulsecore/remap_sse.c
+++ b/src/pulsecore/remap_sse.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/resampler.c b/src/pulsecore/resampler.c
index cd95c5b..1d20fd4 100644
--- a/src/pulsecore/resampler.c
+++ b/src/pulsecore/resampler.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/rtpoll.c b/src/pulsecore/rtpoll.c
index d90c996..ea74e66 100644
--- a/src/pulsecore/rtpoll.c
+++ b/src/pulsecore/rtpoll.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/sample-util.c b/src/pulsecore/sample-util.c
index 38201b2..4555c0e 100644
--- a/src/pulsecore/sample-util.c
+++ b/src/pulsecore/sample-util.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/sconv-s16le.c b/src/pulsecore/sconv-s16le.c
index 138e418..bc0f721 100644
--- a/src/pulsecore/sconv-s16le.c
+++ b/src/pulsecore/sconv-s16le.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/sconv.c b/src/pulsecore/sconv.c
index f0f154f..0b7a96c 100644
--- a/src/pulsecore/sconv.c
+++ b/src/pulsecore/sconv.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/sconv_sse.c b/src/pulsecore/sconv_sse.c
index 3c9a809..5652f8a 100644
--- a/src/pulsecore/sconv_sse.c
+++ b/src/pulsecore/sconv_sse.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/semaphore-posix.c b/src/pulsecore/semaphore-posix.c
index 2aa1bce..6746c41 100644
--- a/src/pulsecore/semaphore-posix.c
+++ b/src/pulsecore/semaphore-posix.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/shared.c b/src/pulsecore/shared.c
index 368a6c3..9bbcc49 100644
--- a/src/pulsecore/shared.c
+++ b/src/pulsecore/shared.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/shm.c b/src/pulsecore/shm.c
index fe34a51..56c279d 100644
--- a/src/pulsecore/shm.c
+++ b/src/pulsecore/shm.c
@@ -20,6 +20,8 @@
     USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c
index f6f93b8..2ad56d6 100644
--- a/src/pulsecore/sink-input.c
+++ b/src/pulsecore/sink-input.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/sink-input.h b/src/pulsecore/sink-input.h
index af2177a..70a7354 100644
--- a/src/pulsecore/sink-input.h
+++ b/src/pulsecore/sink-input.h
@@ -243,6 +243,7 @@ struct pa_sink_input {
 };
 
 PA_DECLARE_PUBLIC_CLASS(pa_sink_input);
+
 #define PA_SINK_INPUT(o) pa_sink_input_cast(o)
 
 enum {
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index e4c343d..0767552 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/sink.h b/src/pulsecore/sink.h
index 0b5048a..173fb84 100644
--- a/src/pulsecore/sink.h
+++ b/src/pulsecore/sink.h
@@ -288,6 +288,7 @@ struct pa_sink {
 };
 
 PA_DECLARE_PUBLIC_CLASS(pa_sink);
+
 #define PA_SINK(s) (pa_sink_cast(s))
 
 typedef enum pa_sink_message {
diff --git a/src/pulsecore/sioman.c b/src/pulsecore/sioman.c
index 24c046c..fedc4e2 100644
--- a/src/pulsecore/sioman.c
+++ b/src/pulsecore/sioman.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/sndfile-util.c b/src/pulsecore/sndfile-util.c
index fe20486..3bc2098 100644
--- a/src/pulsecore/sndfile-util.c
+++ b/src/pulsecore/sndfile-util.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/socket-client.c b/src/pulsecore/socket-client.c
index 23d5d88..a026110 100644
--- a/src/pulsecore/socket-client.c
+++ b/src/pulsecore/socket-client.c
@@ -20,6 +20,8 @@
     USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/socket-server.c b/src/pulsecore/socket-server.c
index 0b0b2a5..c558a0a 100644
--- a/src/pulsecore/socket-server.c
+++ b/src/pulsecore/socket-server.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/socket-util.c b/src/pulsecore/socket-util.c
index 2b8d463..6d7cbcd 100644
--- a/src/pulsecore/socket-util.c
+++ b/src/pulsecore/socket-util.c
@@ -21,6 +21,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/sound-file-stream.c b/src/pulsecore/sound-file-stream.c
index 24d3314..72382d6 100644
--- a/src/pulsecore/sound-file-stream.c
+++ b/src/pulsecore/sound-file-stream.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/sound-file.c b/src/pulsecore/sound-file.c
index 3db0981..30adb49 100644
--- a/src/pulsecore/sound-file.c
+++ b/src/pulsecore/sound-file.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/source-output.c b/src/pulsecore/source-output.c
index 844dd22..33689f1 100644
--- a/src/pulsecore/source-output.c
+++ b/src/pulsecore/source-output.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/source-output.h b/src/pulsecore/source-output.h
index e60430f..918e526 100644
--- a/src/pulsecore/source-output.h
+++ b/src/pulsecore/source-output.h
@@ -216,6 +216,7 @@ struct pa_source_output {
 };
 
 PA_DECLARE_PUBLIC_CLASS(pa_source_output);
+
 #define PA_SOURCE_OUTPUT(o) pa_source_output_cast(o)
 
 enum {
diff --git a/src/pulsecore/source.c b/src/pulsecore/source.c
index 6308f54..a666e60 100644
--- a/src/pulsecore/source.c
+++ b/src/pulsecore/source.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/source.h b/src/pulsecore/source.h
index 30c2037..3bf5f9c 100644
--- a/src/pulsecore/source.h
+++ b/src/pulsecore/source.h
@@ -229,6 +229,7 @@ struct pa_source {
 };
 
 PA_DECLARE_PUBLIC_CLASS(pa_source);
+
 #define PA_SOURCE(s) pa_source_cast(s)
 
 typedef enum pa_source_message {
diff --git a/src/pulsecore/start-child.c b/src/pulsecore/start-child.c
index 7f55d4e..4d2eaa7 100644
--- a/src/pulsecore/start-child.c
+++ b/src/pulsecore/start-child.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/strbuf.c b/src/pulsecore/strbuf.c
index f131d5c..0062316 100644
--- a/src/pulsecore/strbuf.c
+++ b/src/pulsecore/strbuf.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/strlist.c b/src/pulsecore/strlist.c
index b2ba12b..8e7f1c9 100644
--- a/src/pulsecore/strlist.c
+++ b/src/pulsecore/strlist.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/svolume_c.c b/src/pulsecore/svolume_c.c
index 272e7a7..3208056 100644
--- a/src/pulsecore/svolume_c.c
+++ b/src/pulsecore/svolume_c.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/svolume_mmx.c b/src/pulsecore/svolume_mmx.c
index f9fc175..046ecc5 100644
--- a/src/pulsecore/svolume_mmx.c
+++ b/src/pulsecore/svolume_mmx.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/svolume_orc.c b/src/pulsecore/svolume_orc.c
index b178bbf..c4e5d18 100644
--- a/src/pulsecore/svolume_orc.c
+++ b/src/pulsecore/svolume_orc.c
@@ -21,6 +21,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/svolume_sse.c b/src/pulsecore/svolume_sse.c
index fe08de4..c6a71db 100644
--- a/src/pulsecore/svolume_sse.c
+++ b/src/pulsecore/svolume_sse.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/tagstruct.c b/src/pulsecore/tagstruct.c
index a0f1f10..d5a13e7 100644
--- a/src/pulsecore/tagstruct.c
+++ b/src/pulsecore/tagstruct.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/thread-mq.c b/src/pulsecore/thread-mq.c
index b492793..c350f2f 100644
--- a/src/pulsecore/thread-mq.c
+++ b/src/pulsecore/thread-mq.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/thread-posix.c b/src/pulsecore/thread-posix.c
index 3f4ae5c..1ad84f2 100644
--- a/src/pulsecore/thread-posix.c
+++ b/src/pulsecore/thread-posix.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/time-smoother.c b/src/pulsecore/time-smoother.c
index 7a61a75..a8fdb08 100644
--- a/src/pulsecore/time-smoother.c
+++ b/src/pulsecore/time-smoother.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/tokenizer.c b/src/pulsecore/tokenizer.c
index cb682d6..e4487a2 100644
--- a/src/pulsecore/tokenizer.c
+++ b/src/pulsecore/tokenizer.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/usergroup.c b/src/pulsecore/usergroup.c
index c244865..cd41195 100644
--- a/src/pulsecore/usergroup.c
+++ b/src/pulsecore/usergroup.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/x11prop.c b/src/pulsecore/x11prop.c
index baf5b01..c0aef43 100644
--- a/src/pulsecore/x11prop.c
+++ b/src/pulsecore/x11prop.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/pulsecore/x11wrap.c b/src/pulsecore/x11wrap.c
index 454507a..37acf69 100644
--- a/src/pulsecore/x11wrap.c
+++ b/src/pulsecore/x11wrap.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CATEGORY_CORE
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/tests/asyncmsgq-test.c b/src/tests/asyncmsgq-test.c
index 9fbe5bc..ed72380 100644
--- a/src/tests/asyncmsgq-test.c
+++ b/src/tests/asyncmsgq-test.c
@@ -17,6 +17,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "asyncmsgq-test"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/tests/asyncq-test.c b/src/tests/asyncq-test.c
index 6ac8cba..95c4b9a 100644
--- a/src/tests/asyncq-test.c
+++ b/src/tests/asyncq-test.c
@@ -17,6 +17,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "asyncq-test"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/tests/connect-stress.c b/src/tests/connect-stress.c
index c4c6efc..f512358 100644
--- a/src/tests/connect-stress.c
+++ b/src/tests/connect-stress.c
@@ -17,6 +17,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "connect_stress"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/tests/flist-test.c b/src/tests/flist-test.c
index 6915204..d768a9b 100644
--- a/src/tests/flist-test.c
+++ b/src/tests/flist-test.c
@@ -17,6 +17,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "flist-test"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/tests/format-test.c b/src/tests/format-test.c
index bb66c85..fd9d5e7 100644
--- a/src/tests/format-test.c
+++ b/src/tests/format-test.c
@@ -17,6 +17,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "format-test"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/tests/get-binary-name-test.c b/src/tests/get-binary-name-test.c
index 7a09bc2..d0c1b00 100644
--- a/src/tests/get-binary-name-test.c
+++ b/src/tests/get-binary-name-test.c
@@ -17,6 +17,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "get-binary-name-test"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/tests/hook-list-test.c b/src/tests/hook-list-test.c
index 452e477..58326a8 100644
--- a/src/tests/hook-list-test.c
+++ b/src/tests/hook-list-test.c
@@ -1,3 +1,5 @@
+#define PA_LOG_CATEGORY_DEFAULT "hook-list-test"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/tests/interpol-test.c b/src/tests/interpol-test.c
index ad00aca..1ff259f 100644
--- a/src/tests/interpol-test.c
+++ b/src/tests/interpol-test.c
@@ -17,6 +17,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "interpol-test"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/tests/ipacl-test.c b/src/tests/ipacl-test.c
index fa190cf..6aaeec4 100644
--- a/src/tests/ipacl-test.c
+++ b/src/tests/ipacl-test.c
@@ -1,3 +1,5 @@
+#define PA_LOG_CATEGORY_DEFAULT "ipacl-test"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/tests/lock-autospawn-test.c b/src/tests/lock-autospawn-test.c
index e2db24c..8b95627 100644
--- a/src/tests/lock-autospawn-test.c
+++ b/src/tests/lock-autospawn-test.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "lock-autospawn-test"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/tests/mainloop-test.c b/src/tests/mainloop-test.c
index ab23de4..40d0aaf 100644
--- a/src/tests/mainloop-test.c
+++ b/src/tests/mainloop-test.c
@@ -17,6 +17,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "mainloop-test"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/tests/memblock-test.c b/src/tests/memblock-test.c
index b82c41a..ca36686 100644
--- a/src/tests/memblock-test.c
+++ b/src/tests/memblock-test.c
@@ -17,6 +17,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "memblock-test"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/tests/memblockq-test.c b/src/tests/memblockq-test.c
index 51e1717..a2d1b65 100644
--- a/src/tests/memblockq-test.c
+++ b/src/tests/memblockq-test.c
@@ -17,6 +17,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "memblockq-test"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/tests/mix-test.c b/src/tests/mix-test.c
index 19b5ea5..94b8f67 100644
--- a/src/tests/mix-test.c
+++ b/src/tests/mix-test.c
@@ -17,6 +17,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "mix-test"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/tests/once-test.c b/src/tests/once-test.c
index b1ef6ba..943c8eb 100644
--- a/src/tests/once-test.c
+++ b/src/tests/once-test.c
@@ -17,6 +17,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "once-test"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/tests/proplist-test.c b/src/tests/proplist-test.c
index f5a54d6..84c2b8a 100644
--- a/src/tests/proplist-test.c
+++ b/src/tests/proplist-test.c
@@ -17,6 +17,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "proplist-test"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/tests/queue-test.c b/src/tests/queue-test.c
index 6b3e895..0116f78 100644
--- a/src/tests/queue-test.c
+++ b/src/tests/queue-test.c
@@ -17,6 +17,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "queue-test"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/tests/remix-test.c b/src/tests/remix-test.c
index 19f5582..a174344 100644
--- a/src/tests/remix-test.c
+++ b/src/tests/remix-test.c
@@ -17,6 +17,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "remix-test"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/tests/resampler-test.c b/src/tests/resampler-test.c
index 87681c6..254a2f1 100644
--- a/src/tests/resampler-test.c
+++ b/src/tests/resampler-test.c
@@ -17,6 +17,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "resampler-test"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/tests/rtpoll-test.c b/src/tests/rtpoll-test.c
index 6a6b73a..9bf39bc 100644
--- a/src/tests/rtpoll-test.c
+++ b/src/tests/rtpoll-test.c
@@ -17,6 +17,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "rtpoll-test"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/tests/rtstutter.c b/src/tests/rtstutter.c
index 739683d..a08fa0e 100644
--- a/src/tests/rtstutter.c
+++ b/src/tests/rtstutter.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "rtstutter-test"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/tests/sigbus-test.c b/src/tests/sigbus-test.c
index 4b9ca84..eff4e0a 100644
--- a/src/tests/sigbus-test.c
+++ b/src/tests/sigbus-test.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "sigbus-test"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/tests/smoother-test.c b/src/tests/smoother-test.c
index 4471669..486dcf4 100644
--- a/src/tests/smoother-test.c
+++ b/src/tests/smoother-test.c
@@ -17,6 +17,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "smoother-test"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/tests/stripnul.c b/src/tests/stripnul.c
index d677ad2..a2d448a 100644
--- a/src/tests/stripnul.c
+++ b/src/tests/stripnul.c
@@ -17,6 +17,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "stripnul-test"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/tests/thread-mainloop-test.c b/src/tests/thread-mainloop-test.c
index 599f195..6838204 100644
--- a/src/tests/thread-mainloop-test.c
+++ b/src/tests/thread-mainloop-test.c
@@ -17,6 +17,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "thread-mainloop-test"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/tests/thread-test.c b/src/tests/thread-test.c
index 6441dc7..8134d8f 100644
--- a/src/tests/thread-test.c
+++ b/src/tests/thread-test.c
@@ -17,6 +17,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "thread-test"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/tests/volume-test.c b/src/tests/volume-test.c
index f7405ff..7148486 100644
--- a/src/tests/volume-test.c
+++ b/src/tests/volume-test.c
@@ -17,6 +17,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "volume-test"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/utils/pacat.c b/src/utils/pacat.c
index ec360f7..a2e45e5 100644
--- a/src/utils/pacat.c
+++ b/src/utils/pacat.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "utils-pacat"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/utils/pacmd.c b/src/utils/pacmd.c
index c7c693b..cd11a7e 100644
--- a/src/utils/pacmd.c
+++ b/src/utils/pacmd.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "utils-pacmd"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/utils/pactl.c b/src/utils/pactl.c
index 5346b94..a3028c3 100644
--- a/src/utils/pactl.c
+++ b/src/utils/pactl.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "utils-pactl"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/utils/padsp.c b/src/utils/padsp.c
index f6a3520..1b855f2 100644
--- a/src/utils/padsp.c
+++ b/src/utils/padsp.c
@@ -20,6 +20,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "utils-padsp"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/utils/pasuspender.c b/src/utils/pasuspender.c
index 0a60923..bd4f4ae 100644
--- a/src/utils/pasuspender.c
+++ b/src/utils/pasuspender.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "utils-pasuspender"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/utils/pax11publish.c b/src/utils/pax11publish.c
index 0f9a030..7bb2ec2 100644
--- a/src/utils/pax11publish.c
+++ b/src/utils/pax11publish.c
@@ -19,6 +19,8 @@
   USA.
 ***/
 
+#define PA_LOG_CATEGORY_DEFAULT "utils-pax11publish"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
-- 
1.7.7.6



More information about the pulseaudio-discuss mailing list