Get Console Output?

Discussion in 'Plugin Development' started by Meatiex, Dec 25, 2014.

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

    Meatiex

    How would I get all the output that shows up in the console?

    I plan on making a java jframe console that shortens things like login messages.

    Any help is awesome :D
     
  2. Offline

    Windy Day

    @Meatiex
    You can add a handler to the bukkit logger with:
    Code:
    Bukkit.getServer().getLogger().addHandler(handler);
     
    mythbusterma likes this.
  3. Offline

    Meatiex

    How would I define a handler?
    Sorry for the late reply, I couldn't get to my computer for a few days.
     
  4. Offline

    1Rogue

    Make a class that extends Handler or create an anonymous class for it, and fill out the implementation for what you want it to do. Read the Handler javadoc
     
    mythbusterma likes this.
  5. Offline

    TGRHavoc

    Wouldn't he be better off adding a custom Appender to the org.apache.logging.log4j.core.Logger, that way he can receive all of the console output (Including chat messages) instead of just receiving the plugin messages that use "getLogger().info(String)"?
     
Thread Status:
Not open for further replies.

Share This Page