You should probably look at your configuration file. You probably have an extra set of curly braces in your format string. Especially if it's printing on every line. (*Chris*)
On Mon, Jul 29, 2013 at 1:08 PM, gaston sponer <[email protected]>wrote: > I just realized that event.getMessage() print "{}", so I 've decided to > replace event.getMessage by event.getFormattedMessage(). > > And the two outputs Debug are printed because one of them belongs to > event.getLevel(), the other one belongs to the log level from xml file that > is also set as Debug. > <logger name="Company_Module" level="debug"/> > > Thanks for you quick reply. > > ------------------------------ > Date: Mon, 29 Jul 2013 12:18:01 -0700 > From: [email protected] > To: [email protected] > Subject: Re: [logback-user] Curly Braces > > > Yeah, something is not working correctly there. The curly braces should > not appear in the log message at all, they are placeholders for the > toString substitutions of the arguments. The other confusing thing to me > is the multiple DEBUG outputs. Is there any chance that what you are > looking at is someone's wrapper around straight-up SLF4J? It would be > helpful if you could show your source with at least the imports and maybe > your logback.xml configuration as well. > > > On Mon, Jul 29, 2013 at 12:10 PM, gaston sponer <[email protected] > > wrote: > > Hi, i'm doing: > > logger.debug("{}", employee); > > And the log resutl is: > > DEBUG [main] Company_Module - {}DEBUG Level - Personal: name=John, > age=36, id=3124362] > > Is there any way to remove curly braces before DEBUG word from this log? > > I would like to have: > > DEBUG [main] Company_Module - DEBUG Level - Personal: name=John, age=36, > id=3124362] > > > Thanks ยก > > > > _______________________________________________ > Logback-user mailing list > [email protected] > http://mailman.qos.ch/mailman/listinfo/logback-user > > > > _______________________________________________ Logback-user mailing list > [email protected] http://mailman.qos.ch/mailman/listinfo/logback-user > > _______________________________________________ > Logback-user mailing list > [email protected] > http://mailman.qos.ch/mailman/listinfo/logback-user >
_______________________________________________ Logback-user mailing list [email protected] http://mailman.qos.ch/mailman/listinfo/logback-user
