Page 1 of 1

Java Logging

Posted: 03 May 2010, 16:37
by willf
Hi i have a few questoins regarding the logging.

Are there multiple levels of "trace"?

There isn't any way to get my SmartfoxServer.log.log logs into the trace window for extensions right?

Also for using logging is there a way to use parameter substition :
SmartFoxServer.log.log(Level.INFO,"hi {0} ", new Object[]{"there."});
outputs:
hi {0} instead of hi there.

Thanks

Posted: 04 May 2010, 07:36
by Lapo
Are there multiple levels of "trace"?
No, there is one level.
There isn't any way to get my SmartfoxServer.log.log logs into the trace window for extensions right?
No, only traces do that. Otherwise the AdminTool would be flooded.
Also for using logging is there a way to use parameter substition :
SmartFoxServer.log.log(Level.INFO,"hi {0} ", new Object[]{"there."});
outputs:
hi {0} instead of hi there.
Yes, use String.format or String.printf from the JDK5