[Tutorial] How to detect server console output

Discussion in 'Resources' started by MinecraftShamrock, Jun 3, 2013.

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


    What if a plugin uses System.out.println() can we catch that, or is there a native java method for that?
  2. Offline


    Cirno Which of These tons of imports? :p
  3. Offline


    MinecraftShamrock I'm sorry but can't you just do Scanner scan = new scanner(System.out)
  4. Offline


    You have to hijack System.out with System.setOut and your own PrintStream.
  5. Offline


    Sounds pretty simple :p
  6. Offline


    This code doesn't work for me with 1.7.9-R0.2 some sort of mismatche between log4j loggers and java.util loggers. Can you post your import statements as well? Maybe a link to a project that uses this code?


    Edit: I changed my bukkit maven dependency to use craftbukkit instead, and suddenly I had access to all the right logging classes. Thanks, it works great!
  7. Offline


    When exactly is the close method being called? I tried to do System.out.println(); in the close method, but when I close the server by closing the windows command prompt, nothing happens
    Habbolant likes this.
Thread Status:
Not open for further replies.

Share This Page