Server Log Getting Too Big =/

Discussion in 'Bukkit Help' started by Bkhandan, Mar 26, 2012.

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


    Server.log file is getting very large very fast what can i do to stop it?
    running dev 1.2.4 on linux

    900mb in 2 day
    Thx For Help
  2. Offline


    Step 1: Stop Server
    Step 2: Delete log
    Step 3: Start server
  3. Offline



    Appreciate the answer but I know how to do that

    Was wondering if there is a way to cut
    Back log entries by server, which are informational

    Thx again
  4. Offline


    Okay so... You know how to make a server on linux, which most kids dont seem to know how to do... But you dont know how to stop the server, delete your server.log, and then start the server again. Im starting to lose hope inside people trying to be server admins.
  5. Offline


    Navigate to the root of the server directory and delete the server.log.
  6. Offline


    I don't know if you misunderstood sorry
    Let me try again

    I know how to bring mc server down and restart
    And to delete large log file no problem there

    But need to know how to prevent log file
    From getting so large so fast

    Thx again
  7. Offline


    Why don't you try looking and see what's inside the log file first before posting? If you took a look first, I'm sure you could figure the problem out yourself.
  8. Offline


    It might be a plugin spitting out errors, better check the log before deleting it.
  9. Offline


    Just have your start-up script rename server.log and archive it to wherever you like. Then you always start with a fresh log, without losing the old ones.
  10. Offline


    Likely a plugin mega-spamming your console with errors. This will probably filter the errors:
    grep -v "[SEVERE]" server.log > server2.log
    mv server2.log server.log
  11. Offline


    appreciate the info.. will check the log to see which plugin is causing issues... thx
  12. Offline


  13. Offline


    Everyone here has forgotten about the command line arguments you can use!

    Bukkit has some not-very-well-known features for stuff like this. Add this to the end of your startup arguments:
    So your startup command will look something like this now:
    java --Xmx2G (other fancy args here) -jar craftbukkit.jar --log-limit=10000
    This will limit your log file to 10000 lines. If you want, you can have it just make a new log file every time you startup by adding this:
    MegaNarwhal likes this.
  14. Offline


    I didn't know we had those parameters available to us
    Thx for sharing

    Will try tonight

  15. Offline


    Command worked great and added screen to run job in background

    Thank you all
  16. Offline

    Nathan C

    It's called log rotation.

    Google it.
  17. Offline


    the --log-limit 1000 will delete the log after it has 1000 lines
  18. Offline


    As well, there are other command line options you can choose from.

    --log-append false
    This will stop the log appending on each start of the server (aka, fresh server.log on every startup).

    You can also use the below option with different variables to rotate your log virtually any way you like.
Thread Status:
Not open for further replies.

Share This Page