How to grab the bukkit terminal output?

Discussion in 'Bukkit Discussion' started by infected9, Jul 15, 2014.

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

    infected9

    Hello ;),
    currently I'm working with python (my "native" programming language is c++). Well, I started two days ago so don't expect very much =).

    But my point is anyway the following:
    I wanted to grab the bukkit terminal output. It would be the best if it could be done in realtime. But that's only aesthetic.I would be happy anyway either.

    I started already googling around, and wanted to ask, which approach would be "the best" (please excuse my choice of words ;)).
    1. running the server as subprocess
    2. push the servers output to stdout and grab it.
    3. let the server write his output to a file, and read from file.

    Does anyone know what would be the "best" practice?

    Thanks a lot! :)

    PS: Did I pick the right subforum?! Wasn't sure about that
     
  2. Offline

    Syd

  3. Offline

    deltahat

    I implemented exactly what you are looking for in SSHD. https://github.com/rmichela/Bukkit-SSHD/

    I take the entire console output and copy it into an interactive SSH session. Bukkit 1.7.x uses a hybrid of Java logging and Log4J. The magic happens in ConsoleShellFactory.getIn() method.
     
  4. Offline

    infected9

    Hey guys,

    thanks for your quick reply. :)
    The reason I'm asking is that I want to write a "server monitor".
    I want to drop commands per already existing bash script and get the output from the running bukkit instance.
     
  5. Offline

    deltahat

    I think there is a command line option to turn off JLine and then you can pipe the output into a text file (or whatever).

    You may also be able to use the rcon protocol to read and write to the server from stdin/stdout.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 9, 2016
Thread Status:
Not open for further replies.

Share This Page