Ok, let's take a step back.  You are making a big deal out of a 
misunderstanding of what seam is doing combined with a bug in seam.

Seam log messages are structured messages.  You can:

1 - log contextual state using expressions, without needing to inject values 
and invoke methods. 
2 - log formatted data easily
3 - eliminate overhead from message creation (string buffer builders, etc...) 
when the message is not logged - without needing to uglify your code with 
isLogged() tests.

For that you only have pay one small price - your log messages need to be a 
format string, like a printf. You wouldn't printf("this is the message " + 
someOtherData), would you?  You would printf("this is the message %s", 
someOtherData) because if someOtherData had format codes, it would get messed 
up.  

That's all that is happening here.  You are using a raw text string as a 
message string.  If you want to log a raw string, call log("#0", 
yourRawTextString).  There's no magic here.  There's nothing scandalous or 
shocking here.  It's simply a format string.

You happened to not run into this before because of a bug in Seam 1.1 that 
didn't interpolate correctly when no parameters were passed in.   This happened 
to be magnified by a recent change I made that caused an exception to be thrown 
when called with a bad format string.   I fixed that issue so that it won't 
complain loudly when the user has an error in his format string.

I really don't know what to say.  If you'd like a logging method that doesn't 
use a format string, open a JIRA issue.  I don't think I see a need to explode 
the API further, but its worth consideration.


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012675#4012675

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012675
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to