mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
spa: support: send TID to systemd journal
Knowing which thread posted which log message can be useful, so send the TID to the systemd journal. The `TID` field is explicitly listed on https://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html#TID=
This commit is contained in:
parent
58812103f3
commit
2b6541f503
2 changed files with 6 additions and 0 deletions
|
|
@ -22,6 +22,8 @@
|
|||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
|
@ -114,6 +116,9 @@ impl_log_logtv(void *object,
|
|||
sd_journal_send_with_location(file_buffer, line_buffer, func,
|
||||
"MESSAGE=%s", message_buffer,
|
||||
"PRIORITY=%i", priority,
|
||||
#ifdef HAVE_GETTID
|
||||
"TID=%jd", (intmax_t) gettid(),
|
||||
#endif
|
||||
NULL);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ if systemd_dep.found()
|
|||
|
||||
spa_journal_lib = shared_library('spa-journal',
|
||||
spa_journal_sources,
|
||||
include_directories : [ configinc ],
|
||||
dependencies : [ spa_dep, systemd_dep ],
|
||||
install : true,
|
||||
install_dir : spa_plugindir / 'support')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue