Prevent Debug Messages in Your Console/Logs

Aug 21, 2014
Prevent Debug Messages in Your Console/Logs
  • Preventing Debug Messages in Console & Logs

    As of build #1609, this behavior can be toggled in the spigot.yml config file with the setting "debug", which now defaults to false. In the future the debug logging behavior can be toggled from there without having to do any more runtime arguments to change it.


    Since build #1578 Spigot logs all debug messages. But due to how some panels work, this may cause unneeded spam in your console and can make logs files bigger and harder to manually process. This guide will help you revert this change and allow you to revert back to default behaviour by just adding a start-up flag.


    • Ability to save files to the jar directory (or accessible by configuring a directory)
    • The ability to change your start-up flags (or directly insert a file into the jar archive)
    • The file found here saved as a .xml file


    Same folder(top)

    Once you have the above file saved as something (we will refer to it as log4j2.xml, substitute your name if you named it differently), upload it or place it in the same folder as your spigot.jar. Once this is done, you will need to add the following flag to your startup before you declare the jar file.
    • -Dlog4j.configurationFile=log4j2.xml
    So for example, this might be your old/new start-up command.
    • java -Xmx1G -jar spigot.jar
    • java -Dlog4j.configurationFile=log4j2.xml -Xmx1G -jar spigot.jar

    Different folder(top)

    If you cant access your jar folder, you can place it elsewhere if you know how to directly access it. For example, if you put it in your plugins folder you can access it by changing the start-up flag to
    • -Dlog4j.configurationFile=./plugins/log4j2.xml

    Inserting the file directly into the jar archive(top)

    If you cannot change the start-up flags (such as in a shared hosting environment where a control panel such as Multicraft is used, clients have only paid for a certain amount of RAM set by the company which the client cannot change and therefore cannot edit the file used to start the server), download the xml code specified above and save it as 'log4j2.xml'. Open the spigot.jar file with a compression program such as WinRAR or 7-Zip and replace the existing log4j2.xml file with the one you downloaded (drag + drop the file you downloaded into the spigot.jar and click 'ok' to replace the existing file). You may now run the spigot.jar as normal without having to add any extra start-up flags, however you will need to do this process each time you download a new spigot.jar build.
  • Loading...
  • Loading...