Server Log Getting Too Big =/

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

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

    Bkhandan

    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

    S.L.P.Major

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

    Bkhandan

    Hello

    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

    Phinary

    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

    Atraius

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

    Bkhandan

    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
    B
     
  7. Offline

    phrstbrn

    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

    Lolmewn

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

    zipfe

    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

    TheBeast808

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

    Bkhandan

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

    cnaude

  13. Offline

    chaseoes

    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:
    Code:
    --log-limit=10000
    So your startup command will look something like this now:
    Code:
    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:
    Code:
    --log-append=false
     
    MegaNarwhal likes this.
  14. Offline

    Bkhandan

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

    Will try tonight

    B
     
  15. Offline

    Bkhandan

    Command worked great and added screen to run job in background


    --log-limit=10000
    Thank you all
    B
     
  16. Offline

    Nathan C

    It's called log rotation.

    Google it.
     
  17. Offline

    computerman_

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

    TnT

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

    Code:
    --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.
    Code:
    --log-pattern
    
     
Thread Status:
Not open for further replies.

Share This Page