log: use native journald protocol for when running as a service

When running waybar as a systemd service, allows a slighty more readable
and searchable (in particular, by log level) using journal metadata.
This commit is contained in:
Max Gautier
2025-12-11 21:58:09 +01:00
parent 161367d961
commit 2c9e83441a
2 changed files with 57 additions and 0 deletions
+5
View File
@@ -111,6 +111,10 @@ gtk_layer_shell = dependency('gtk-layer-shell-0', version: ['>=0.9.0'],
default_options: ['introspection=false', 'vapi=false'],
fallback: ['gtk-layer-shell', 'gtk_layer_shell'])
systemd = dependency('systemd', required: get_option('systemd'))
libsystemd = dependency('libsystemd', required: get_option('systemd'))
if libsystemd.found()
add_project_arguments('-DHAVE_LIBSYSTEMD', language: 'cpp')
endif
cpp_lib_chrono = compiler.compute_int('__cpp_lib_chrono', prefix : '#include <chrono>')
have_chrono_timezones = cpp_lib_chrono >= 201611
@@ -541,6 +545,7 @@ executable(
upower_glib,
pipewire,
playerctl,
libsystemd,
libpulse,
libjack,
libwireplumber,