You no longer need to create a startup message + Logger Instance

Discussion in 'Plugin Development' started by RROD, Jan 26, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    RROD

    Yes, I just noticed. I intentionally didn't want one so I didn't add one. Turns out Bukkit automagically put one in for me.

    It defaults to:
    [INFO] [Plugin Name] Loading PluginName v(version number).
    and
    [INFO] [Plugin Name] Unloading PluginName v(version number).
     
  2. I still use it as I used it from the beginning at the last line in onEnable(). So if both lines are there everything is fine, if only the loading one something went wrong. ;)
     
  3. Offline

    RROD

    Also another addition with Logging:
    plugin.getLogger();
    This will now return the main instance of Bukkit's Logger.
     
  4. Offline

    Daniel Heppner

    Pretty sure that's always been there, or at least through a server object.
     
  5. Offline

    RROD

    Well it's another thing I've not noticed before.
     
    Daniel Heppner likes this.
  6. Offline

    nisovin

    I believe plugin.getLogger() will get a logger that automatically prepends your plugin name to your log messages.
     
    Daniel Heppner likes this.
  7. Offline

    hatstand

    Cool, a two line change.
     
    RROD likes this.
  8. I noticed this a few days ago. When I have the chance I'll remove my startup messages from my plugins.

    Keir
     
  9. Offline

    MrMag518

    It says "loading <pluginname>"
    That points to that the plugin load'ing'
    In my case, I always use "loaded"
    So it'll turn to something like this:
    Code:
    "Loading AgreatPlugin"
    ..
    "Loaded AgreatPlugin"
     
Thread Status:
Not open for further replies.

Share This Page