sentry-java: ERROR Recursive call to appender Sentry
Hi, I’m trying to configure log4j2 and sentry to work using this config:
<?xml version="1.0" encoding="UTF-8"?>
<configuration status="warn" shutdownHook="disable"
packages="org.apache.logging.log4j.core,net.kencochrane.raven.log4j2">
<appenders>
<Raven name="Sentry">
<dsn>
https://url-to-sentry
</dsn>
<ravenFactory>net.kencochrane.raven.DefaultRavenFactory</ravenFactory>
</Raven>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
</Console>
</appenders>
<loggers>
<root level="all">
<AppenderRef ref="Console"/>
<AppenderRef ref="Sentry"/>
</root>
</loggers>
</configuration>
But I keep getting “ERROR Recursive call to appender Sentry” printed
What am I doing wrong?
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Reactions: 2
- Comments: 17
Commits related to this issue
- ref: revert type assignment (#139) — committed to getsentry/sentry-java by bruno-garcia 5 years ago
I tried chasing this down again to no avail. It’s interesting that a user above fixed this in an older version by filtering out all Sentry logs from Sentry itself, which we do now for all logging frameworks.
I’ve realized that our documentation and example logging configurations were pretty poor, because I don’t understand why you’d actually want to set the Sentry appender to anything below
WARN. Our example apparently told people to configure Sentry atALLwhich is just a bad idea all around. But, most of all, I can’t seem to reproduce this at all.That said, I’m going to improve the docs/examples so that Sentry is filtered to
WARNand above – and if this is an actual production issue for anyone I’d be curious on the details or an example mini project I can use to repro.