How to set log messages in a server script

To check what is happening during the execution of a Server script (custom scripts, server hooks...) Gamedonia provides a simple way to set log messages and see them later in the Gamedonia Dashboard. For a deeper and more complete debug process, check our Debugger plugin for Eclipse.

You can check the logs generated by your scripts at the Server Code -> Log tab. There are 3 types of logs:

  • Info: You can set a custom text message to show up in the Message field of the log. To set an info log on a script, write a line like this in the code:

    log.info("I created an entity successfully!");
    
  • Warn: Automatically generated warning. These will appear in the Log tab when a warning is detected.

  • Error: Automatically generated error. These will appear in the Log tab when an error is detected. It will include a message with a type of error, where you can get more information about the cause of the script failure.

More info here: Server code guide