-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
SentryAppender
causing warnings
#2966
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is a duplicate of #1805, which was fixed in |
@vy After I update the version to 2.23.0,
|
@chandrabol, typo. 🤦 Mind upgrading to Edit: You can workaround the issue by adding |
Upgraded to 2.24.0. Getting this message -
Pom.xml - Log4j2.xml - <?xml version="1.0" encoding="UTF-8"?>
<configuration status="warn" packages="org.apache.logging.log4j.core,io.sentry.log4j2">
<Properties>
<Property name="instant">false</Property>
<Property name="LOG_LEVEL">INFO</Property>
<Property name="XRAY_LOG_LEVEL">WARN</Property>
<Property name="AUDIT_LOG_LEVEL">TRACE</Property>
</Properties>
<appenders>
<Console name="Console" target="SYSTEM_OUT">
<JsonTemplateLayout eventTemplateUri="classpath:logStructure.json" locationInfoEnabled="true"/>
</Console>
<Console name="Audit" target="SYSTEM_OUT">
<PatternLayout pattern='%m%n'/>
</Console>
<Sentry name="Sentry" />
</appenders>
<Loggers>
<AsyncLogger name="com.gravty.framework.audit" additivity="false" level="TRACE" includeLocation="true">
<AppenderRef ref="Audit" level = "${env:AUDIT_LOG_LEVEL}"/>
</AsyncLogger>
<AsyncLogger name="com.gravty" additivity="false" level="DEBUG" includeLocation="true">
<appender-ref ref="Console" level = "${env:LOG_LEVEL}"/>
<appender-ref ref="Sentry" level="ERROR" />
</AsyncLogger>
<AsyncLogger name="com.amazonaws.xray" additivity="false" level="WARN" includeLocation="true">
<appender-ref ref="Console" level = "${env:XRAY_LOG_LEVEL}"/>
</AsyncLogger>
<AsyncRoot level="WARN" additivity="false" includeLocation="true">
<appender-ref ref="Console"/>
</AsyncRoot>
</Loggers>
</configuration> |
@chandrabol, could you share the complete |
Can you check if removing the
If it disappears and everything works, it might be a false positive. Which version of Are you using shading? See our Shading/Shadowing FAQ entry. |
@chandrabol, allow me to share some more findings: The
|
SentryAppender
causing warnings
Description
We have an application that defines custom Log Levels.
When we use the JsonTemplateLayout (https://logging.apache.org/log4j/2.x/manual/json-template-layout.html)
we sometimes get a Null pointer Exception
Configuration
Version: 2.19.0
Operating system: MacOs
JDK: JDK 17
Logs
Reproduction
public static void main(String args[]) {
log.log(EngineLogLevel.AUDIT.getLevel(), Utilities.toJson(auditLog));
}
The text was updated successfully, but these errors were encountered: