You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to set the log level for a specific package, such as the following (I added one line to the default example provided in the documentation here and set the root log level to "TRACE"):
<?xml version="1.0" encoding="UTF-8"?>
<Configuration>
<Appenders>
<Consolename="JsonAppender"target="SYSTEM_OUT">
<JsonTemplateLayouteventTemplateUri="classpath:LambdaJsonLayout.json" />
</Console>
</Appenders>
<Loggers>
<!--Set a new log level for a specific package here-->
<Loggername="software.amazon"level="WARN"/>
<Loggername="JsonLogger"level="TRACE"additivity="false">
<AppenderRefref="JsonAppender"/>
</Logger>
<Rootlevel="trace">
<AppenderRefref="JsonAppender"/>
</Root>
</Loggers>
</Configuration>
Is this type of configuration modification supported? When I try this with the @Logging annotation in a Java 11-based Lambda, these level-based statements are ignored (but working locally). Could this be related to the the way I package the application using Maven? This only seems to work if I modify the logging configuration within the Java handler like the following:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to set the log level for a specific package, such as the following (I added one line to the default example provided in the documentation here and set the root log level to "TRACE"):
Is this type of configuration modification supported? When I try this with the
@Logging
annotation in a Java 11-based Lambda, these level-based statements are ignored (but working locally). Could this be related to the the way I package the application using Maven? This only seems to work if I modify the logging configuration within the Java handler like the following:Beta Was this translation helpful? Give feedback.
All reactions