Debug Level - BoBoBalloon/InnovativeItemsDOCS GitHub Wiki

Intro

It's in the nature of any customizable plugin that things will go wrong, whether it be from a bug or a configuration syntax mishap. Because of this, it is important to be able to detect bugs and find out what's going on behind a plugin. This is where debug levels come in. Debug levels as a whole are to assist what type of debug messages are sent in console and what debug messages are ignored. For example, you as a server owner don't care about every little thing the plugin is doing. You don't want your console getting flooded with information you don't care about. To combat this, you can lower the debug level. The lower the debug level, the less information you are given in console.

Debug Levels

Currently there are six debug levels you can set the plugin to, they range from 0-5.

  • A debug level of 5 will show you all debug messages being fired
  • A debug level of 4 will show you debug messages with the level of warning, severe, info and dev
  • A debug level of 3 will show you debug messages with the level of warning, severe and info
  • A debug level of 2 will show you debug messages with the level of warning and severe
  • A debug level of 1 will show you debug messages with the level of severe
  • A debug level of 0 will show you very little to no debug messages

The debug level is set to 2 by default.

How to set the Debug Level

There are currently two ways you can change the debug level of the plugin, you can either change the value directly in the config.yml and reload the plugin or via the in game debug command.

To change via the config.yml you first need to find the file in the root folder named config.yml. Once inside the file, you should find a field that looks like this:

#The higher the debug level, the more information displayed in console. Good for bug fixing#
debug-level: 2

Change the value in the debug-level field to any number between 0-5. If the provided number is greater than five it will be set to five. If it is less than zero, it will be set to zero. To apply this change, either restart the server or use the innovative items reload command.

The other way to change the debug level is to use the in game command "innovativeitems debug {0-5}". Doing this will automatically update the debug level in game and update the config.yml to match those changes.

Final Thoughts

When using this plugin, it is imperative you are able to see what errors are occurring behind the scenes to make sure you didn't make any mistakes in your configuration files. But sometimes the volume of debug messages in the console are excessive and are in the way. To ensure this doesn't occur, please remember the debug level feature and your ability to limit or increase how much information you are being given.