1. 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

Complete server logs with no pre-buffering before writes

Discussion in 'Suggestions & Ideas' started by hierbo, Nov 21, 2013.

Mods: Rainbows
  1. hierbo

    hierbo Ballista Bolt Thrower
    1. The Young Blood Collective - [YB]

    Messages:
    190
    Hey guys,

    As an addendum to the request I made in the thread "More verbose and complete RCON output", I'd like to also request that the server's output to the log (which can be captured with 'nohup' for those who use Linux) be written out on demand, rather than after the buffer is full. Allow me to elaborate:

    The output to 'nohup.out' is updated regularly by the running server software. However, it does not output line by line, but rather in batches after filling a buffer. The problem with this is that it reduces the timeliness of the readable output. For example, if I run 'tail -f ./nohup.out', I can see the contents of the server log scrolling by in real time, except for when the buffer is not full, in which case I see nothing. For example, if a player collapses a 52 tile structure, I see the output in the server stating that fact, but it does not show up in nohup.out until after enough other output has stacked up in the server to fill aforementioned buffer, triggering a write to nohup.out, emptying the buffer again.

    I know this may seem like a nitpick, but allow me to relate a little anecdote about another game to describe the power of said log if it works as I describe in my messages. In Soldat, the dedicated server outputs to a log file in real time, meaning that as things happen, they are immediately written to the log file and can be read. A room mate and I built a parser for the log file that understood all of the possible log output, and populated a MySQL database with the information. This information, because of the thoroughness of the logging, allowed us to know who died and when, how long they had lived, who killed them, with what weapon, how long they had been online and when, and the list goes on and on. We used this data to provide content with a sort of scoreboard website that included who was on at the moment (give or take a couple minutes), players' current kill:death ratio, favorite weapon, among numerous other stats, all persistently saved in the database for reference by anyone with access to the page.

    All I mentioned in the previous paragraph would be entirely possible for King Arthur's Gold via the exact same method, among others, if the logging worked as I described. Unfortunately, I lack the expertise to recreate all the mentioned features by myself, but I am sure there are many members of the community that can already see what I mean and know how to implement such a thing, and would likely do so in a heartbeat. Hell, I can even try to get my old room mate into KAG and get him to make it. Implement these features, and I promise to buy him a copy! :wink:
     
    Last edited: Nov 22, 2013
    UnnamedPlayer, Duplolas and Contrary like this.
  2. Leo

    Leo Haxor

    Messages:
    503
    I totally agree, we need better logs for possible status scripts.
     
    hierbo likes this.
Mods: Rainbows