Hi admin,
How to print log in a java class in server. I reseach and try with an example but it don't work.
private final Logger m_log;
public ChessGameBoard() {
m_log = LoggerFactory.getLogger("com.xdevteam.chess.ChessGameBoard");
....
}
public boolean methodA() {
m_log.info("It should be displayed in server.log");
}
Please give me some solutions.
Cheer,
How to print log in a java class in server.
-
- Posts: 35
- Joined: 22 Aug 2015, 16:20
Re: How to print log in a java class in server.
Hi,
in your main Extension class and all other Request and Event handlers you can simply call trace(...)
example:
This will show up in the server logs.
If you want to customize your logging you can read this article:
http://smartfoxserver.com/blog/?p=416
cheers
in your main Extension class and all other Request and Event handlers you can simply call trace(...)
example:
Code: Select all
trace("Hello... this is a log message");
This will show up in the server logs.
If you want to customize your logging you can read this article:
http://smartfoxserver.com/blog/?p=416
cheers
-
- Posts: 35
- Joined: 22 Aug 2015, 16:20
Re: How to print log in a java class in server.
Thanks Lapo very much.
Return to “SFS2X Java / Android API”
Who is online
Users browsing this forum: No registered users and 34 guests