Logging

Discussion in 'Plugin Development' started by DrAgonmoray, Jun 12, 2012.

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

    DrAgonmoray

  2. Offline

    Sagacious_Zed Bukkit Docs

    Each plugin can obtain a reference to their logger with the getLogger method. the method must be called inside onEnable or later pretty much like all the methods in JavaPlugin
     
  3. Offline

    DrAgonmoray

    like so?
    Code:
    public class Village extends JavaPlugin {
        public static Logger log;
       
        @Override
        public void onEnable() {
            log = getLogger();
        }
    }
     
  4. Offline

    imjake9

    Yes, that is correct.
     
  5. Offline

    DrAgonmoray

  6. Offline

    Sagacious_Zed Bukkit Docs

    Personally like all the other values in JavaPlugin, I would try to minimize the scope they are loose in. But in the case of the logger it is not quite as crucial.
     
Thread Status:
Not open for further replies.

Share This Page