logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorbjørn Ravn Andersen <thunderax...@gmail.com>
Subject Re: Logging messages using java 1.5 format string
Date Mon, 04 Aug 2008 20:06:35 GMT
Ashish Kulkarni skrev  den 04-08-2008 21:45:
> Hi
> Is there anyway to format the log messages using java 1.5 format
> capabilities
> for example i can have a nice formatted out put using
> System.out.format("Number of Users on Registry %1$s, is %2$d",
> registry.getName(), userSet.size());
>   
Use slf4j as the logging interface and use log4j as the backend.

You can then call

log.debug("Name: {} Size {}", "Foo", new Integer(10));


-- 
  Thorbjørn Ravn Andersen          "... plus... Tubular Bells!"


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message