Page 1 of 1

use sentry with servoy

PostPosted: Tue Mar 07, 2023 4:02 pm
by gerardimmeker
Hi all,
Did any of you even have used https://sentry.io/ for logging?
How did you implent it with servoy?

Regards,

Gerard Immeker

Re: use sentry with servoy

PostPosted: Fri Mar 17, 2023 11:39 am
by rgansevles
Servoy uses log4j2 for logging.

Sentry seems to have an integration with log4j, see https://sentry.io/for/log4j2/

I guess if you add sentry-log4j2.jar to the war file, you could modify the log4j2.xml as shown in that page,

Re: use sentry with servoy

PostPosted: Mon Mar 20, 2023 1:42 pm
by gerardimmeker
Hi Rob,
I've add the jar to the tomcat/lib folder.
Added the appender to the xml file.
When we deploy the solution, the error below occours.
[Fatal Error] log4j2.xml:31:17: Open quote is expected for attribute "dsn" associated with an element type "Sentry". │
│ ERROR StatusLogger Error parsing /usr/local/tomcat/webapps/autoflex/WEB-INF/log4j2.xml

Any ideas?
Regards,
Gerard

Re: use sentry with servoy

PostPosted: Mon Mar 20, 2023 5:18 pm
by ptalbot
As the error says, your log4j2.xml is probably malformed, there is a missing double quote somewhere.
Check the quotes for the "dsn" attribute in the <Sentry> appender.