Bug 232080 - [WPE][GTK] Enable logging under non-systemd linux distros
Summary: [WPE][GTK] Enable logging under non-systemd linux distros
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CMake (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-21 08:00 PDT by ablocorrea
Modified: 2022-01-18 15:55 PST (History)
11 users (show)

See Also:


Attachments
Patch (14.58 KB, patch)
2021-10-21 08:06 PDT, ablocorrea
no flags Details | Formatted Diff | Diff
Patch (14.59 KB, patch)
2021-10-21 08:19 PDT, ablocorrea
no flags Details | Formatted Diff | Diff
Patch (17.89 KB, patch)
2021-10-21 08:49 PDT, ablocorrea
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ablocorrea 2021-10-21 08:00:38 PDT
For linux distributions which do not use systemd, there exists an alternative login deamon, elogind, which is commonly used. elogind is compatible with systemd's journald interface. Renaming the `USE_SYSTEMD` configuration option to `ENABLE_JOURNALD_LOG` and adding the possibility to detect libelogind, would allow such distros to build with logging enabled.
Comment 1 ablocorrea 2021-10-21 08:06:22 PDT
Created attachment 442024 [details]
Patch
Comment 2 ablocorrea 2021-10-21 08:19:43 PDT
Created attachment 442026 [details]
Patch
Comment 3 Michael Catanzaro 2021-10-21 08:29:15 PDT
Comment on attachment 442026 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=442026&action=review

> w/Source/WTF/wtf/Logger.h:244
> -#if USE(SYSTEMD)
> +#if USE(JOURNALD)

If you're changing the name of the public build option to ENABLE_JOURNALD_LOG, then also change its usage in the code to ENABLE(JOURNALD_LOG).

> w/Source/cmake/OptionsWPE.cmake:240
>          SET_AND_EXPOSE_TO_BUILD(USE_JOURNALD TRUE)

Then here you would SET_AND_EXPOSE_TO_BUILD(ENABLE_JOURNALD_LOG TRUE)
Comment 4 ablocorrea 2021-10-21 08:49:54 PDT
Created attachment 442031 [details]
Patch
Comment 5 ablocorrea 2021-10-21 08:52:05 PDT
(In reply to Michael Catanzaro from comment #3)
> Comment on attachment 442026 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=442026&action=review
> 
> > w/Source/WTF/wtf/Logger.h:244
> > -#if USE(SYSTEMD)
> > +#if USE(JOURNALD)
> 
> If you're changing the name of the public build option to
> ENABLE_JOURNALD_LOG, then also change its usage in the code to
> ENABLE(JOURNALD_LOG).
> 
> > w/Source/cmake/OptionsWPE.cmake:240
> >          SET_AND_EXPOSE_TO_BUILD(USE_JOURNALD TRUE)
> 
> Then here you would SET_AND_EXPOSE_TO_BUILD(ENABLE_JOURNALD_LOG TRUE)

Makes sense and should also help tracking the source of the macro. Consequently, I have also renamed all entries of USE(JOURNALD) to ENABLE(JOURNALD_LOG)
Comment 6 Michael Catanzaro 2021-10-21 09:16:15 PDT
Phil, any objections? The patch looks good to me.
Comment 7 EWS 2021-10-22 01:44:08 PDT
Committed r284673 (243393@main): <https://commits.webkit.org/243393@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 442031 [details].