Remote log viewer

Discussion in 'Archived: Plugin Requests' started by MedievalMinecraft, May 9, 2013.

  1. i would like a plugin that copys the log every say 10 minutes and then has a port that it outputs this file too so admins can view it remotely like a webpage they can scroll up and down and see the whole log

    1. saves server.log
    2.outputs to a port
    3. password would be nice so if a player finds the port they dont have access to the logs

    Uses:
    - allows admins to investigate player claims remotly without having access to the actual files
     
  2. Offline

    CubieX

    This seems to be more of a Bash/PHP scripting task than a bukkit plugin task.
    You could use a Linux CRON task to execute a bash script that compresses the file,
    sets a password and copies the file to a public web directory of your webserver. (provided you have a root server)
    So people who know the path can download it.

    But be aware that the server.log can grow very fast. Especially when a plugin emits errors.
     
  3. Offline

    hintss

    or just y'know, symlink it to your www folder.
     
  4. Offline

    -_Husky_-

    MedievalMinecraft
    A small script like this?

    Code:
    #!/bin/sh
    cd /serverdir
    current_time=$(date "+%Y.%m.%d-%H.%M.%S")
    mv "server.log" "/var/www/html/Logs/$current_time"
    echo "Moved the server logs!"
    * /var/www/html is for the web directory, change it, if need be.

    How to install?

    cd into the folder you desire, and then type
    Code:
    nano logMove.sh
    Paste the contents of this, into it.
    Show Spoiler
    Code:
    #!/bin/sh
    cd /serverdir
    current_time=$(date "+%Y.%m.%d-%H.%M.%S")
    mv "server.log" "/var/www/html/Logs/$current_time"
    echo "Moved the server logs!"


    Then CTRL + X, Y, Enter.

    Enjoy.
     

Share This Page