RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2024310 - RFE: CustomLog should be able to use journald
Summary: RFE: CustomLog should be able to use journald
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: httpd
Version: CentOS Stream
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Luboš Uhliarik
QA Contact: rhel-cs-infra-services-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-11-17 19:25 UTC by Pat Riehecky
Modified: 2021-11-18 08:41 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1209162
Environment:
Last Closed: 2021-11-18 08:41:20 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-103080 0 None None None 2021-11-17 19:31:03 UTC

Description Pat Riehecky 2021-11-17 19:25:52 UTC
I'm not showing these patches in Stream 9.

+++ This bug was initially created as a clone of Bug #1209162 +++

Description of problem:

mod_log_config doesn't allow to use syslog facility like this:

CustomLog syslog:local4

(like it's possible with ErroLog).

Version-Release number of selected component (if applicable): 	httpd-2.4.6-31


How reproducible:
100%

Steps to Reproduce:
1.Try to use the syslog syntax provided by ErrorLog on CustomLog
2.
3.

Actual results:
Does not work

Expected results:
Can use native syslog capabilities

Additional info:

--- Additional comment from Joe Orton on 2020-06-15 10:50:33 UTC ---

It does not appear to be feasible to backport syslog support for CustomLog.  However, I have found a way to backport journald support, though without the structured logging support used in upstream 2.5's mod_journald.

I am therefore adjusting the RFE to cover just journald.  mod_journald will be supported once there is a stable (e.g. 2.6) release which we can package as a new module stream.

--- Additional comment from Joe Orton on 2020-06-15 12:21:42 UTC ---

The syntax supported is:

  CustomLog journald:priority format|nickname

where "priority" is a priority string as in LogLevel http://httpd.apache.org/docs/2.4/mod/core.html#loglevel
Only priorities up to debug are permitted (the syslog/journald interfaces do not support trace* levels)

--- Additional comment from Branislav Náter on 2020-06-15 14:56:55 UTC ---

(In reply to Joe Orton from comment #28)
> The syntax supported is:
> 
>   CustomLog journald:priority format|nickname
> 
> where "priority" is a priority string as in LogLevel
> http://httpd.apache.org/docs/2.4/mod/core.html#loglevel
> Only priorities up to debug are permitted (the syslog/journald interfaces do
> not support trace* levels)

Were there any documentation backported?

--- Additional comment from Joe Orton on 2020-06-15 15:25:07 UTC ---

No; in fact overriding the priority level is not possible with the extensions to mod_log_config and mod_journald from trunk/2.5, which will always default to the INFO level for transfer logs (and maps error log levels to the appropriate level from httpd internal log level).

Not sure where best to document this, release notes is maybe sufficient?

--- Additional comment from errata-xmlrpc on 2020-11-04 03:35:12 UTC ---

Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: httpd:2.4 security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:4751

Comment 1 Joe Orton 2021-11-18 08:32:33 UTC
Nice catch Pat, thank you for reporting it.

Comment 2 Joe Orton 2021-11-18 08:41:20 UTC
Correction, sorry - the syslog: support for CustomLog is still not something we can easily do in 2.4.x and will have to wait for 2.6.

journald: support for CustomLog is present in the RHEL9 packages and works the same as RHEL8 (our tests confirm that).


Note You need to log in before you can comment on or make changes to this bug.