Bug 97342 - Enable structured logging output
Summary: Enable structured logging output
Status: RESOLVED MOVED
Alias: None
Product: PolicyKit
Classification: Unclassified
Component: daemon (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: David Zeuthen (not reading bugmail)
QA Contact: David Zeuthen (not reading bugmail)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-14 12:10 UTC by Philip Withnall
Modified: 2018-08-20 21:39 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
polkitbackend: Enable structured logging output (24.65 KB, patch)
2016-08-14 12:10 UTC, Philip Withnall
Details | Splinter Review
polkitbackend: Fix typos in a couple of initialisation error messages (1.18 KB, patch)
2016-08-14 12:10 UTC, Philip Withnall
Details | Splinter Review
src: Switch from g_print() to g_log() (24.52 KB, patch)
2016-08-14 12:10 UTC, Philip Withnall
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Philip Withnall 2016-08-14 12:10:26 UTC
Using the new GLib structured logging support, send structured log messages to journald. This simplifies polkit's logging code a little, and allows more information to be sent to the journal. Specifically, MESSAGE_IDs can now be sent; and connecting directly to the journal means it will get the right process information.

This bumps the GLib dependency to 2.49.4.
Comment 1 Philip Withnall 2016-08-14 12:10:29 UTC
Created attachment 125778 [details] [review]
polkitbackend: Enable structured logging output

This bumps polkit's GLib dependency to 2.49.4, but enables new features
such as message IDs for log messages, inclusion of various key
parameters as separate fields, and (probably most importantly) coloured
log output.

A custom log writer function is used to preserve the original behaviour
of outputting everything to the journal, and outputting debug messages
to stdout unless --no-debug is specified.
Comment 2 Philip Withnall 2016-08-14 12:10:31 UTC
Created attachment 125779 [details] [review]
polkitbackend: Fix typos in a couple of initialisation error messages
Comment 3 Philip Withnall 2016-08-14 12:10:33 UTC
Created attachment 125780 [details] [review]
src: Switch from g_print() to g_log()

Use G_LOG_USE_STRUCTURED to ensure that the structured logging mode is
used.
Comment 4 Ray Strode [halfline] 2018-04-03 18:27:31 UTC
Pushing the easy patch now, the other patches still need review.

Attachment 125779 [details] pushed as 743eef5 - polkitbackend: Fix typos in a couple of initialisation error messages
Comment 5 GitLab Migration User 2018-08-20 21:39:22 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/polkit/polkit/issues/67.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.