set outputPatternAsPresentationHeader programatically?

Hello. Just letting you know that logback is awesome, and I like it a lot. I have a quick question regarding the new release. Is there a way to set 'outputPatternAsPresentationHeader' to 'false' programatically? I get the default pattern output to stdout even before I get my hands on the logger context: ILoggerFactory factory = LoggerFactory.getILoggerFactory(); So by the time I get to even begin to configure my own layout, the pattern of the default layout is already on the screen (and it's not even the pattern that I'm trying to configure). Also the link on the web page to "one-question survey" appears to be broken. I would like to suggest to leave that option as 'false' by default, and give the ability for people to turn it on when they need to. Otherwise, logback is awesome, and I am looking forward to new features and enhancements. Thank you very much. :) CheerZ! :)

On 02.05.2012 22:36, Andrzej Zadorozny wrote:
Hello.
Just letting you know that logback is awesome, and I like it a lot.
I have a quick question regarding the new release. Is there a way to set 'outputPatternAsPresentationHeader' to 'false' programatically?
Sure. Get a hold of the PatternLayoutEncoder referenced by your appender (with the getEncoder() method) and invoke its setOutputPatternAsPresentationHeader() method with 'false' as parameter.
I get the default pattern output to stdout even before I get my hands on the logger context: ILoggerFactory factory = LoggerFactory.getILoggerFactory();
The ConsoleAppender created by BasicConfigurator had this problem. It has been fixed in the source repository.
So by the time I get to even begin to configure my own layout, the pattern of the default layout is already on the screen (and it's not even the pattern that I'm trying to configure).
Also the link on the web page to "one-question survey" appears to be broken.
Thank you for the heads up. It's now corrected.
I would like to suggest to leave that option as 'false' by default, and give the ability for people to turn it on when they need to.
That seems to be the majority opinion.
Otherwise, logback is awesome, and I am looking forward to new features and enhancements.
Thank you very much. :)
Much appreciated.
CheerZ! :)
-- Ceki http://twitter.com/#!/ceki

Sounds great. Thank you very much for such a quick response. :) CheerZ! :) On Wed, May 2, 2012 at 2:50 PM, ceki <ceki@qos.ch> wrote:
On 02.05.2012 22:36, Andrzej Zadorozny wrote:
Hello.
Just letting you know that logback is awesome, and I like it a lot.
I have a quick question regarding the new release. Is there a way to set '**outputPatternAsPresentationHea**der' to 'false' programatically?
Sure. Get a hold of the PatternLayoutEncoder referenced by your appender (with the getEncoder() method) and invoke its setOutputPatternAsPresentation **Header() method with 'false' as parameter.
I get the default pattern output to stdout even before I get my hands on
the logger context: ILoggerFactory factory = LoggerFactory.**getILoggerFactory();
The ConsoleAppender created by BasicConfigurator had this problem. It has been fixed in the source repository.
So by the time I get to even begin to configure my own layout, the
pattern of the default layout is already on the screen (and it's not even the pattern that I'm trying to configure).
Also the link on the web page to "one-question survey" appears to be broken.
Thank you for the heads up. It's now corrected.
I would like to suggest to leave that option as 'false' by default, and
give the ability for people to turn it on when they need to.
That seems to be the majority opinion.
Otherwise, logback is awesome, and I am looking forward to new features
and enhancements.
Thank you very much. :)
Much appreciated.
CheerZ! :)
-- Ceki http://twitter.com/#!/ceki ______________________________**_________________ Logback-user mailing list Logback-user@qos.ch http://mailman.qos.ch/mailman/**listinfo/logback-user<http://mailman.qos.ch/mailman/listinfo/logback-user>
-- ---------------------------------------------------------- Andrzej Zadorozny (andrzej.zadorozny@gmail.com) -=[ www.andrzej.ca ]=- ---------------------------------------------------------- "Some things are true whether you believe in them or not." - Seth (City of Angels)
participants (2)
-
Andrzej Zadorozny
-
ceki