<div dir="ltr">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.<div> (*Chris*)</div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Mon, Jul 29, 2013 at 1:08 PM, gaston sponer <span dir="ltr"><<a href="mailto:gaston.sponer@hotmail.com" target="_blank">gaston.sponer@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div dir="ltr">I just realized that event.getMessage() print "{}", so I 've decided to replace event.getMessage by event.getFormattedMessage().<div><br></div><div>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.</div>
<div><logger name="Company_Module" level="debug"/></div><div><br></div><div>Thanks for you quick reply.<br><br><div><hr>Date: Mon, 29 Jul 2013 12:18:01 -0700<br>From: <a href="mailto:robertkuhar@gmail.com" target="_blank">robertkuhar@gmail.com</a><br>
To: <a href="mailto:logback-user@qos.ch" target="_blank">logback-user@qos.ch</a><br>Subject: Re: [logback-user] Curly Braces<div><div class="h5"><br><br><div dir="ltr">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.</div>
<div><br><br><div>On Mon, Jul 29, 2013 at 12:10 PM, gaston sponer <span dir="ltr"><<a href="mailto:gaston.sponer@hotmail.com" target="_blank">gaston.sponer@hotmail.com</a>></span> wrote:<br>
<blockquote style="border-left:1px #ccc solid;padding-left:1ex">
<div><div dir="ltr">Hi, i'm doing:<div><br></div><div>logger.debug("{}", employee);</div><div><br></div><div>And the log resutl is:</div><div><br></div><div> DEBUG [main] Company_Module - {}DEBUG Level - Personal: name=John, age=36, id=3124362]</div>
<div><br></div><div>Is there any way to remove curly braces before DEBUG word from this log?</div><div><br></div><div>I would like to have:</div><div><br></div><div> DEBUG [main] Company_Module -<font color="#d24726"> </font>DEBUG Level - Personal: name=John, age=36, id=3124362]</div>
<div><br></div><div><br></div><div>Thanks ˇ</div><div><br></div><div><br></div> </div></div>
<br>_______________________________________________<br>
Logback-user mailing list<br>
<a href="mailto:Logback-user@qos.ch" target="_blank">Logback-user@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/listinfo/logback-user" target="_blank">http://mailman.qos.ch/mailman/listinfo/logback-user</a><br></blockquote></div><br></div>
<br>_______________________________________________
Logback-user mailing list
<a href="mailto:Logback-user@qos.ch" target="_blank">Logback-user@qos.ch</a>
<a href="http://mailman.qos.ch/mailman/listinfo/logback-user" target="_blank">http://mailman.qos.ch/mailman/listinfo/logback-user</a></div></div></div></div> </div></div>
<br>_______________________________________________<br>
Logback-user mailing list<br>
<a href="mailto:Logback-user@qos.ch">Logback-user@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/listinfo/logback-user" target="_blank">http://mailman.qos.ch/mailman/listinfo/logback-user</a><br></blockquote></div><br></div>