3

My application log

17:44:58,578 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback-test.xml]
17:44:58,671 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
17:44:58,671 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
17:44:58,687 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
17:44:58,812 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Popping appender named [STDOUT] from the object stack
17:44:58,812 |-INFO in ch.qos.logback.classic.joran.action.LevelAction - root level set to DEBUG
17:44:58,812 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[root]



17:44:58.828 [main] INFO  chapters.configuration.MyApp2 - Entering application.
17:44:58.828 [main] DEBUG chapters.configuration.Foo - Did it again!
17:44:58.828 [main] INFO  chapters.configuration.MyApp2 - Exiting application.

I don't want it to look logbacks own logs at STDOUT. How can I disable them within logback.xml?

kamaci
  • 72,915
  • 69
  • 228
  • 366
  • You want to disable logback's logs? Is that it? If it is: add a logger for ch.qos.logback with a high level (WARN or ERROR) and INFO / DEBUG logs of logback won't appear. – zenbeni Nov 06 '13 at 12:58
  • @zenbeni that has not worked. – kamaci Nov 06 '13 at 13:18
  • 1
    http://stackoverflow.com/questions/3257154/how-to-prevent-logback-from-outputting-its-own-status-at-the-start-of-every-log?rq=1 duplicate – Silviu Burcea Nov 06 '13 at 13:26
  • 2
    This is not a duplicate of the linked question, as this question does not have an error in the configuration file (which is the reason for the many log statements in the linked question). Also, the linked question does not have an accepted answer and there is no clear right answer. – Paul Dec 06 '14 at 18:08
  • @kamaci Did you find an answer to your question? The question which the community marked as the duplicate of your question does not have an accepted answer and even the most voted up answer does not work for me. – Honza Zidek Nov 26 '20 at 16:58

0 Answers0