[slf4j-user] MessageFormatter: brackets in brackets
Jean-Luc Geering
jgeering at optaros.com
Wed Oct 1 16:09:34 CEST 2008
Hi Ceki,
Thanks for the quick reply and for the presentation yesterday (JUGS event)!
I do have a problem with "{{}}" (i.e. no formatting, have "{{}}" in the log),
using slf4j-api-1.5.2 and slf4j-log4j12-1.5.2.
I quickly tested with 1.5.3, and get the same behavior.
Bug? My fault? Do you need more details?
JL
----- Original Message -----
From: "Ceki Gulcu" <listid at qos.ch>
To: "User list for the slf4j project" <user at slf4j.org>
Sent: Wednesday, October 1, 2008 3:19:12 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna
Subject: Re: [slf4j-user] MessageFormatter: brackets in brackets
Hello Jean-Luc,
Thank you for your message. Comments inline.
Jean-Luc Geering wrote:
> Hi there,
>
> On [1] I read that
>
> " In case your message contains the '{' or the '}' character, you do not
> have to do anything special unless the '}' character immediately follows
> '}' "
>
> shouldn't it be " ... unless the '}' character immediately follows '{' " ?
Yes, absolutely. Fixed in revision 1153.
> and related to that, if I want to produce "hello{world}", shouldn't I be
> able to write log.debug("hello{{}}, "world"); ?
Yes. You can write
log.debug("hello{{}}, "world");
which will produce the message "hello {world}" assumming the logger is enabled
for the debug level.
Are you observing a different behavior?
--
Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch
_______________________________________________
user mailing list
user at slf4j.org
http://www.slf4j.org/mailman/listinfo/user
More information about the slf4j-user
mailing list