[logback-user] Curly Braces

gaston sponer gaston.sponer at hotmail.com
Mon Jul 29 22:08:52 CEST 2013


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: robertkuhar at gmail.com
To: logback-user at qos.ch
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 <gaston.sponer at hotmail.com> 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

Logback-user at qos.ch

http://mailman.qos.ch/mailman/listinfo/logback-user



_______________________________________________
Logback-user mailing list
Logback-user at qos.ch
http://mailman.qos.ch/mailman/listinfo/logback-user 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20130729/98383aa3/attachment.html>


More information about the Logback-user mailing list