Should RMB enable FolioLog4j2LogDelegate by default?
Description
Environment
None
Potential Workaround
None
relates to
Checklist
hideTestRail: Results
Activity
Show:

Marc Johnson August 17, 2018 at 12:49 PM
Thanks.

Julian Ladisch August 17, 2018 at 12:47 PM
A module may create this to switch it on:

Marc Johnson August 17, 2018 at 12:37 PMEdited
I think if we always want exceptions to be logged in this manner and we want this to happen without the intervention (or awareness) of the module developer (which I believe was the concern with the log writing class I had previously used), then I think it should be switched on by default.
If we didn't have it switched on by default, and modules needed to activate it, where in the lifecycle would that be done (as I imagine logging is initialised early in the RAML Module Builder initialisation process)?
Details
Assignee
UnassignedUnassignedReporter
Julian LadischJulian LadischPriority
P3Sprint
Development Team
Core: PlatformTestRail: Cases
Open TestRail: CasesTestRail: Runs
Open TestRail: Runs
Details
Details
Assignee
Unassigned
UnassignedReporter

Priority
Sprint
Development Team
Core: Platform
TestRail: Cases
Open TestRail: Cases
TestRail: Runs
Open TestRail: Runs
Created August 17, 2018 at 12:05 PM
Updated July 5, 2021 at 10:18 AM
RMB-211 adds a FolioLog4j2LogDelegate where log.error(e) is changed to also log the stacktrace of exception e. We usually want the stacktrace in the log.
Do we want RMB to automatically enable this for all modules that use RMB?
This is a one line change in RestLauncher.java - replace Log4j2LogDelegateFactory by FolioLog4j2LogDelegateFactory: https://github.com/folio-org/raml-module-builder/blob/master/domain-models-runtime/src/main/java/org/folio/rest/RestLauncher.java