1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Hey Guest, is it this your first time on the forums?

    Visit the Beginner's Box

    Introduce yourself, read some of the ins and outs of the community, access to useful links and information.

    Dismiss Notice

Is there any way to disable logging on a server?

Discussion in 'Server Help' started by TFlippy, Oct 5, 2016.

  1. TFlippy

    TFlippy Arsonist Tester

    Messages:
    87
    I keep getting spammed by ~450 lines of sent files through RCON every time a player joins the server, which causes my game to freeze for a bit while also generating unecessary network traffic. Is there any way to disable logging in general or at least sending of them through RCON?
     
    Last edited: Oct 5, 2016
  2. Furai

    Furai THD Team THD Team Administrator

    Messages:
    3,124
    I'm sorry but I don't think it's possible to disable server logs. I recommend getting a dedicated server and not hosting it off your own home machine.
     
  3. Vamist

    Vamist THD Team THD Team Tester

    Messages:
    544
    Could we get this as a feature in the future? I use a VM to host my servers, So one day i would host kag, the next i would change to starbound or what ever me and my friends want to play, so I'm not really into buying dedicated servers for one game.

    So having this as a feature would be nice, less console and rcon spam.
     
  4. Furai

    Furai THD Team THD Team Administrator

    Messages:
    3,124
    I'm not sure, maybe there is some way currently to do it. I just didn't see it anywhere in config. @Geti?
     
  5. Geti

    Geti Please avoid PMing me (poke a mod instead) THD Team Administrator Global Moderator

    Messages:
    3,730
    you can remove the view_console and view_rcon seclevs to not get sent that stuff. There's no way to disable logging to console+file at this time. The server will still unfortunately get "swamped" downloading so many files on join though :/
     
  6. TFlippy

    TFlippy Arsonist Tester

    Messages:
    87
    Any updates on this? The server now usually freezes for around 5 seconds whenever someone starts downloading the files, with the console getting spammed by roughly 1300 lines of text.
     
    Fuzzle likes this.
  7. Asu

    Asu THD Team THD Team Forum Moderator

    Messages:
    1,580
    Does this happen when you don't launch the dedicated server through cmd? Flushing might cause that performance issue (but so can writing to the logs)
     
  8. Fuzzle

    Fuzzle Grand Grumbler

    Messages:
    297
    I hope writing to logs is asynchronous. Otherwise it'd be blocking execution.
     
  9. Asu

    Asu THD Team THD Team Forum Moderator

    Messages:
    1,580
    Is it if you don't `<< std::flush` or `<< std::endl`? Or does that happen when the internal buffer gets full?
     
  10. Geti

    Geti Please avoid PMing me (poke a mod instead) THD Team Administrator Global Moderator

    Messages:
    3,730
    Buffered IO is used, logs are currently written synchronously. I've considering moving it to a thread (tbh just "more buffering" but allows writing the logs in bigger chunks and means there's no worries about possible flushes) as it seems like low hanging fruit but there's a few complications that stopped me touching it - like how rcon gets sent, and the possibility then of race conditions for any non-console output that touches the log.

    We don't have an async io library available currently, and pulling in something like boost just for that seems heavy-handed.

    I'm ok with adding a no_logging flag that'd prevent logs getting written to disk, but for now OP should consider removing the rcon sending of those lines at least. Even 1300 lines is only maybe a hundred kb at most and shouldn't cause 5 second lag by any stretch of the imagination unless that's getting chopped up into enet packets - it's likely the sending of the files which is bogging down the server tbh.
     
  11. i did some tests with disabled logging today and there wasn't any noticeable improvement, but it was with no mods. does it still slow down without view_console seclev and sv_tcpr_everything = 0?
     
  12. Geti

    Geti Please avoid PMing me (poke a mod instead) THD Team Administrator Global Moderator

    Messages:
    3,730
    (To clarify on this, there's variables to disable logging on the current dev build, which will be out in a little while)