0

I'm using HikariCP with Tomact8.5 and Oracle.

I want to send email everytime HikariCP warns on leak.

HikariCP code:

import org.slf4j.Logger;

LOGGER.warn("{} - leakDetectionThreshold is less than 2000ms or more than maxLifetime, disabling it.", poolName);

Should I write my own code or can I use logging properties to get warning sent in mail?

Ori Marko
  • 56,308
  • 23
  • 131
  • 233

1 Answers1

1

Should I write my own code or can I use logging properties to get warning in mail?

Assuming you are using JUL as the backend for slf4j you can follow the instructions in sending errors and exceptions through emails in apache tomact server start if you want to setup the logging.properties.

If you just want to see that warning you'll have to figure out the JUL logger name that is used to attach the handler at the correct location or you'll have write up and install a custom filter for that specific warning.

jmehrens
  • 10,580
  • 1
  • 38
  • 47