Hello Syvalta, Thank you for your message. I'd to point out that logback does not and cannot *log* from within itself, To be more precise, logback does not generate logging requests without solicitation from client code (code outside logback). There is actually code within logback that drops log messages generated by logback components.
However, logback components are allowed to generate status messages about their internal state and add them to the StatusManager associated with the logback context. Note that most logback components have a reference to their context. If you wanted to have only Warn and Error status messages printed, you could write your own StatusManager that does just that. Unfortunately, at present time you cannot tell LoggerContext to use a StatusManager different than the default. If you kindly enter a Jira issue asking for this feature, I'd be happy to oblige. Syvalta wrote: > Hi, > > I have the following problem with log configuration. If the specified log > file can't be created for some reason, logback fails silently (i.e. nothing > in system.err/out). If I add debug="true" to <configuration> in logback.xml, > I get the error logged but I also get info and debug printed. Is there any > way to get just the errors? > > This is just my uninformed opinion, but I would be in favor of logging WARN > and ERROR to system.err by default, and having an option to turn it off. > > Many thanks. -- Ceki Gülcü QOS.ch is looking to hire talented developers located in Switzerland. If interested, please contact c e k i AT q o s . c h _______________________________________________ Logback-user mailing list [email protected] http://qos.ch/mailman/listinfo/logback-user
