0

Configure Server Logs is what I am reading to see how I can configure server logs for Forgerock OpenIDM. I could not see anything in this document which mentions how we can use any other logging framework than JUL.

Can we really use any other logging framework with Forgerock OpenIDM? Please guide.

dev2d
  • 4,245
  • 3
  • 31
  • 54

1 Answers1

0

I am not knowledgeable with that particular system, but if it logs to java.util.logging instead of the SLF4J API, replacing the logging subsystem may not be possible, as the program has to explicitly load a new handler - it cannot be done at configuration time.

See for example:

JUL to SLF4J Bridge

A commenter writes:

You need to call SLF4JBridgeHandler.install(). You also need to enable all log levels at the root logger (reason in excerpt below) in java.util.logging and remove the default console appender.

...

The reason is that the jul-to-slf4j bridge cannot replace classes in the java.util.logging package to do the redirection statically as it does for the other bridge implementations. Instead it has to register a handler on the root logger and listen for logging statements like any other handler. It will then redirect those logging statements

David Tonhofer
  • 14,559
  • 5
  • 55
  • 51
  • Thanks for this response, I have gone through some references mentioning the same. This adds a considerable overhead just for logging statements and I want to avoid this unless this is the only way to achieve it with OpenIDM. I want to know if there are any configurations I can make to OpenIDM which will make the server use log4j logging config instead JUL – dev2d Mar 06 '20 at 06:02