Bug 1570635 - [Logs] Log4j 'direct' option for performance improved OpenDaylight container STDOUT logging (AKA "docker log")
Summary: [Logs] Log4j 'direct' option for performance improved OpenDaylight container ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: puppet-opendaylight
Version: 13.0 (Queens)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: z2
: 13.0 (Queens)
Assignee: Janki
QA Contact: Itzik Brown
URL:
Whiteboard: Logs
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-23 11:05 UTC by Michael Vorburger
Modified: 2018-12-24 11:40 UTC (History)
9 users (show)

Fixed In Version: puppet-opendaylight-8.2.2-1.9126c8dgit.el7ost
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
N/A
Last Closed: 2018-08-29 16:35:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenDaylight gerrit 72190 0 None None None 2018-06-15 19:46:33 UTC
OpenDaylight gerrit 73135 0 None None None 2018-06-18 16:08:21 UTC
Red Hat Product Errata RHBA-2018:2574 0 None None None 2018-08-29 16:36:50 UTC

Description Michael Vorburger 2018-04-23 11:05:20 UTC
In the "BTW #1:" on https://bugzilla.redhat.com/show_bug.cgi?id=1489704#c7, I had suggested a Log4j option which was not directly related to the scope of that issue, and which we forgot about in the whole Log4j v1 VS v2 confusion there, which this bug tables again; quote from there:

https://logging.apache.org/log4j/2.x/manual/appenders.html#ConsoleAppender documents the "direct" parameter for the ConsoleAppender which "Can give up to 10x performance boost when the output is redirected to file or other process.".

Due to the change from Log4j to v2, the syntax has slightly changed, it's now:

  log4j2.appender.console.direct = true

I have just tested this on an upstream master (future Fluorine) netvirt/karaf (which includes the latest odlparent bump we recently did which lead to some Karaf upgrade) and this does NOT lead to that error message about "No such property [direct] in ..." noted in BZ 1489704#c7, anymore.

This issue is raised just because this seems like a useful log4j option which we should add - why would not use the best possible performance in logging.   

This issue is NOT raised to any specific measured performance degradation related to logging after switching from file based to STDOUT logging (AKA "docker log").  But again it probably couldn't hurt to have the best available.

Comment 13 Janki 2018-08-01 11:09:07 UTC
To verify:

1. ssh into ODL container
   sudo docker exec -it opendaylight_api /bin/bash

2. Check if this line 

     log4j2.appender.console.direct = true 

   is present in /opt/opendaylight/etc/org.ops4j.pax.logging.cfg after
     karaf.log.console=INFO

   when OpenDaylightLogMechanism = console in THT.

Comment 14 Joanne O'Flynn 2018-08-15 08:06:35 UTC
This bug is marked for inclusion in the errata but does not currently contain draft documentation text. To ensure the timely release of this advisory please provide draft documentation text for this bug as soon as possible.

If you do not think this bug requires errata documentation, set the requires_doc_text flag to "-".


To add draft documentation text:

* Select the documentation type from the "Doc Type" drop down field.

* A template will be provided in the "Doc Text" field based on the "Doc Type" value selected. Enter draft text in the "Doc Text" field.

Comment 16 errata-xmlrpc 2018-08-29 16:35:54 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, 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/RHBA-2018:2574


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