How can I disable logging in Restlet 2.0?

前端 未结 6 745
梦如初夏
梦如初夏 2021-01-21 16:20

I simply want to disable Restlet\'s logging to stdout/stderr in my project and forward all Restlet logging through the SLF4J facade provided by org.restlet.ext.slf4j. Is there a

6条回答
  •  隐瞒了意图╮
    2021-01-21 17:08

    Programmatic configuration

    Engine.setRestletLogLevel(Level.OFF);
    

    Details : http://restlet.com/learn/guide/2.2/editions/jse/logging

    Since version 2.1, it is now possible to programmatically change the log level using the Engine#setLogLevel(…) and setRestletLogLevel(…) static methods. It is also possible to enable selective call logging by setting the Request#loggable property or by overriding the LogService#isLoggable(Request) method.

提交回复
热议问题