You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Mark Payne (Jira)" <ji...@apache.org> on 2022/03/02 19:19:00 UTC

[jira] [Updated] (NIFI-9688) Log Messages on Process Shutdown are Discarded due to Logging Deinitialize

     [ https://issues.apache.org/jira/browse/NIFI-9688?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Payne updated NIFI-9688:
-----------------------------
    Issue Type: Bug  (was: Improvement)

> Log Messages on Process Shutdown are Discarded due to Logging Deinitialize
> --------------------------------------------------------------------------
>
>                 Key: NIFI-9688
>                 URL: https://issues.apache.org/jira/browse/NIFI-9688
>             Project: Apache NiFi
>          Issue Type: Bug
>            Reporter: Paul Grey
>            Assignee: David Handermann
>            Priority: Major
>             Fix For: 1.16.0
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> NiFi uses the SLF4J logging API [https://www.slf4j.org/] and the Logback implementation [https://logback.qos.ch/] to capture useful information about the running state of the application.  While this subsystem seems to work well during the normal lifetime of the process, log messages associated with process shutdown activity seem to be lost; they are not written to the configured output files.  As logging is one way to ensure that the all NiFi process components stop cleanly, it would be an improvement find ways to address this issue.
> NiFi seems to use portions of the Spring framework to control component lifecycle, including the configuration found in this web descriptor:
> - [https://github.com/apache/nifi/blob/main/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/webapp/WEB-INF/web.xml]
> Logback seems to be integrated with this framework; it is initialized and active during the lifetime of the embedded NiFi components, but at shutdown, this context is destroyed.
> Here are a couple of posts describing a similar problem, and suggesting a possible remediation:
> - https://stackoverflow.com/questions/33844659/no-log-output-on-contextdestroyed-using-servletcontextlistener-slf4j
> - https://stackoverflow.com/questions/37557754/logging-from-servlet-context-destroyed-event



--
This message was sent by Atlassian Jira
(v8.20.1#820001)