Tagged logging

Discussion in 'Bukkit Preview' started by deltahat, Dec 30, 2011.

  1. Offline

    deltahat

    Feature Overview
    Tagged Logging provides a simple method for automatically attributing log entries to your plugins. Tagged logging provides you the following features.
    1. Automatically logs your plugin's start and stop messages with name and version number.
    2. Adds a new PluginLogger class that automatically tags all log entries from your plugin without any work from you.
    3. Provides a new Plugin.getLogger() method for retrieving the provided PluginLogger object for your plugin.
    4. Provides new access to the Fine, Finer, and Finest log levels for low level debug logging using a bukkit startup switch (verbosity=<value>).
    Using Tagged Logging couldn't be easier. Simply replace all calls to Plugin.getServer().getLogger() with Plugin.getLogger() and all your log messages will automatically be tagged.

    For an example plugin, see https://github.com/rmichela/TaggedLoggingTest.
     
    mushroomhostage likes this.

Share This Page