Products | Versions |
---|---|
TIBCO BusinessEvents Enterprise Edition | - |
Not Applicable | - |
The message argument
to Log.log() is a "format" string. In a format string, the character
"%" is the beginning of a "format specifier". If the message you
are going to log has "%" in the content, and you want to do the log line
as is, instead of passing the logging message with the message
parameter you will need to pass the logging message with the argument
parameter.
For example, instead of:
Log.log(loggerName, logLevel, "something with % inside");
Use:
String formatString = "%1$s";
Log.log(loggerName, logLevel, formatString, "something with % inside");
Here, the format string "%1$s" is a simple format and means log is the first argument.
See http://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html#syntax for details.