Hi David,
I could not find a proper solution for this. I use java.util.logging in the wildfly application.
1. Added the maven dependency to the project
2. Added logging.properties in the jboss logging.properties format. At first, I tried with the logging.properties entries exactly as given in
here but wildfly failed to read that config. Then I tried the below one.
---
logger.level=WARN
logger.handlers=SENTRY
handler.SENTRY=net.kencochrane.raven.jul.SentryHandler
handler.SENTRY.properties=net.kencochrane.raven.jul.SentryHandler.dsn, net.kencochrane.raven.jul.SentryHandler.tags
handler.SENTRY.net.kencochrane.raven.jul.SentryHandler.dsn=https://publicKey:secretKey@host:port/1?options
handler.SENTRY.net.kencochrane.raven.jul.SentryHandler.tags=tag1:value1,tag2:value2
---
3. Added raven jar as a wildfly module.
Now, I get the below error when application is deployed
---
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011555: Failed to configure logging using 'logging.properties' configuration file.
Caused by: java.lang.IllegalArgumentException: No property \"net.kencochrane.raven.jul.SentryHandler.dsn\" setter found for handler \"SENTRY\""}}
---
I could see that there is no associated setter method for
net.kencochrane.raven.jul.SentryHandler.dsn in the
SentryHandler class. I tried adding a setter method for this which I could locate in
raven-logback project. Then the error disappeared and I could see that
dsn variable in SentryHandler class is a null value when wildfly starts up. This means dsn value is never properly read by LogManager. Please help me to find a solution.
Thanks in advance.