cloudwatch-logback-appender icon indicating copy to clipboard operation
cloudwatch-logback-appender copied to clipboard

No AWS logs when exception is thrown during web app deploy on Tomcat

Open amelumad opened this issue 3 years ago • 0 comments

I have a Tomcat web app that checks its configuration integrity in a listener. If an issue is found it throws an exception and the deploy is aborted. This exception is logged just fine in a log file in Tomcat's directory on disk but for some reason it does not appear in AWS stream. Once the app is deployed the logs do get through to AWS.

In other words the first logger does work in the above scenario whilst the second one doesn't.

<logger name="com.voxme.webam" level="INFO" additivity="false">
    <appender-ref ref="STDOUT"/>
    <appender-ref ref="INFO_FILE"/>
    <!--<appender-ref ref="DEBUG_FILE"/>-->
    <appender-ref ref="ERROR_FILE"/>
</logger>

<logger name="com.voxme.webam" level="ERROR" additivity="false">
    <appender-ref ref="CLOUDWATCH"/>
</logger>

logback.zip

amelumad avatar Jun 11 '21 08:06 amelumad