Log Viewer Stops Working

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

yqtang
Posts: 10
Joined: 03 May 2022, 19:14

Log Viewer Stops Working

Postby yqtang » 03 May 2022, 19:24

Hi, after a restart of server yesterday, the log stopped generating. The last log in Log Viewer inside admin website stopped yesterday. And yesterday's log file wasn't generated under {SFS2X}/logs folder. I searched the forum and found someone had a similar issue, and it was because the log level wasn't set. I went to check this link http://docs2x.smartfoxserver.com/Gettin ... figuration, and I can see that the line exists in the file and it was set to INFO. Still the log is stuck now and not generating anything new. Can someone shed some light on this matter? Thank you very much!

This is the property file of the log configuration: https://file.io/TTmpK42KxDag
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Log Viewer Stops Working

Postby Lapo » 04 May 2022, 08:12

Hi,
that's pretty strange.
If possible stop the server then start it up once using the sfs2x.sh (Linux) or sfs2x.bat (Windows) script and see if there's any error messages.

Let us know
Lapo
--
gotoAndPlay()
...addicted to flash games
yqtang
Posts: 10
Joined: 03 May 2022, 19:14

Re: Log Viewer Stops Working

Postby yqtang » 04 May 2022, 14:52

Hi Lapo,

Thank you for reply, after stopping and starting the server and check the log, I did find there were errors about log4j:

log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: logs/smartfox.log (Permission denied)

Then I changed permissions for smartfox.log and boot.log. Now the log viewer is showing new logs. But I only see boot logs and traffic monitor updates, it still doesn't show logs for zone / room extensions. Do you have any idea how to make it show trace debugs for extension scripts? Thank you!
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Log Viewer Stops Working

Postby Lapo » 04 May 2022, 17:22

Can you show me an extract of the logs after you have fixed the permissions?
What we need is just an extract of the logs where the server starts up (from smartfox.log) if possible. If you don't like the idea to publish it here, you can send it via email (zipped) to our support@... email box, with a reference to this discussion.

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
yqtang
Posts: 10
Joined: 03 May 2022, 19:14

Re: Log Viewer Stops Working

Postby yqtang » 05 May 2022, 15:58

Hi Lapo,

Thank you for your reply in the email. So what's still bothering me now is that the trace.debug stuff inside extension scripts won't show up in the log viewer. Do you have any thoughts on that?

And one more symptom I noticed that might be relevant is that yesterday at 0:00 am, the log viewer said shutting down which is not triggered by anyone:

05 May 2022
00:00:04,763 WARN SFS2X ShutdownHook v2.core.SFSShutdownHook SFS2X is shutting down. The process may take a few seconds...
05 May 2022
00:00:04,763 WARN SFS2X ShutdownHook v2.core.SFSShutdownHook SFS2X is shutting down. The process may take a few seconds...
05 May 2022
00:00:04,762 INFO Thread-3 entities.managers.SFSZoneManager BuddyList saveAll...
05 May 2022
00:00:04,762 INFO Thread-3 entities.managers.SFSZoneManager BuddyList saveAll...
05 May 2022
00:00:04,768 INFO Thread-4 entities.managers.SFSBannedUserManager BanUser data saved.
05 May 2022
00:00:04,768 INFO Thread-4 entities.managers.SFSBannedUserManager BanUser data saved.

After that the log viewer was quiet, until I restart the server. I really hope the log viewer can show trace.debug from scripts otherwise it can be hard to diagnose issues on the server side. Thank you again for your patience and support!
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Log Viewer Stops Working

Postby Lapo » 06 May 2022, 07:49

Hi,
yqtang wrote:Thank you for your reply in the email. So what's still bothering me now is that the trace.debug stuff inside extension scripts won't show up in the log viewer. Do you have any thoughts on that?

By setting the global logging level to INFO, the debug messages won't show. That's expected.
Generally speaking I would recommend to use INFO as the level for your Extension logging, so that you don't have to turn on the global DEBUG level, which produces too much logging data on a production server.

There's also a more sophisticated alternative which allows you to customize the logging levels, so that only your Extension classes will use the DEBUG level. It's described here:
https://smartfoxserver.com/blog/custom- ... xtensions/

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 67 guests