I use Sentry (on premise) for our logging. Recently I started moving to the Spring framework, I am not able to get the logs hit Sentry servers. I tried using log4j
and logger (slf4j)
. In both cases I was not able to make any progress. My assumption is that since I use spring-starter
maven dependency, it includes logger
by default, while all documentation on Sentry + Java mentions using raven
. Probably my log configurations are not read because of this.
Can anybody tell me how can I get sentry working on my Spring project?
EDIT:
Here is my logback.xml
which is in classpath.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="Sentry" class="net.kencochrane.raven.logback.SentryAppender">
<dsn>
http://xxx@example.com/sentry/2
</dsn>
</appender>
<root level="error">
<appender-ref ref="Sentry" />
</root>
</configuration>