Cannot get grizzly log to work, nothing written to log4j log file

I have a simple Java / Spring program using the standard log4j.properties file for logging control, which works fine. When we added Grizzly through:

GrizzlyHttpServerFactory.createHttpServer (uri, resourceConfig)

everything works (i.e. the server actually serves ... but I don't get the log output.

I have an explicit entry in log4j.properties for "org.glassfish.grizzly".

I got to debugging in the Grizzly ExtendedLogger class and see that it is approaching logging, but then does not.

+4
source share
1 answer

Turns off Grizzly uses its own log based on java.util.logging, not log4j or slf4j, which means you need a separate logging configuration file. Good usage description: http://www.javapractices.com/topic/TopicAction.do?Id=143

+4
source

Source: https://habr.com/ru/post/1433585/


All Articles