3.2 Server Logs

SmartFoxServer can log a number of server messages based on their level of importance both to log files and to the console. It also offers advanced options for splitting and rotating log files based on the type of installation you're using (standalone / service).

» Basic logging (standalone mode)

By default SmartFoxServer is configured to log messages of WARNING level to file and of INFO level to console.
The available levels from low to high are: FINEST, FINER, FINE, INFO, WARNING, SEVERE.

The first four levels are related to simple notifications about actions taken by the server with different importance level: it can be useful to trace these messages to the console while debugging your multiplayer applications. This way you can see when a server-side variable is set or destroyed, when new rooms are created or removed etc...
This output can also be sent to the file logger but only for debugging, as this would make the log files grow too quickly.

Generally speaking it is recommendable to keep the file level to WARNING and the console level to INFO for production configurations.

The WARNING messages informs about some unexpected condition that has been found during runtime.
For example a malformed request could have been sent for different reasons: a hacking attempt or simply a programming error on the client side etc...
Other examples of WARNINGs can be a user trying to log in with the name of another existing user, a user trying to login when there's no more room for him etc...

The SEVERE message level indicates that a serious problem is going on and it may cause the server to stop running. The conditions under which this error may appear are very rare. Most of these messages can occur when trying to start the server but some necessary files are missing or a configuration error is found.

You can inspect log files by going in the log/ folder inside the Server/ directory.

A log rotation system is also provided to avoid unlimited growth of log files. You can specify the maximum size of a log file before a new one is created and the max. number of files that can be generated. By default the size is set to 500Kb and the max number of files to 5. (See section 2.1 for detailed info)

For specific documentation on how to configure the logging system please refer to section 2.1

» Advanced logging (service mode)

If you have installed SmartFoxServer as a service (under Windows or Linux) all the console output will be redirected to the wrapper log files which also contain further log informations about the status of the wrapper itself. The wrapper is the software that acts as a service/daemon and wraps the JVM process. (we usa a product called Java Service Wrapper)

You can check and modify the wrapper logging options by opening the wrapper.conf found in the Server/wrapper/ folder. By default the log files are stored in the Server/logs/ folder and split every day.

Detailed documentation for the wrapper.conf file can be found at this page


doc index