Log Commands Before

Issue #109 resolved
hakaku created an issue

Would it be possible to have the command module log the command before it's actually performed? I find it difficult to read the log file when you see a bunch of logs pertaining to a certain command, and then seeing the command logged afterwards. It's also more useful to log the command first in terms of figuring out certain crashes: otherwise, the server cuts off the log since it can never reach the end of the command, and you're left guessing what was sent.

tldr; {{{ #!c

//Log the command first Oct 03 18:07:06 I <cmod> loading C module 'apple' from 'fruits' Oct 03 18:07:06 I <cmdman> {arena} [Hakaku] command (arena): insmod fruits:apple }}}

Comments (2)

  1. Former user Account Deleted

    It's not out of the question, but it won't help much with the crashing issue, since the log file is buffered. In my experience, you'll typically lose a couple of lines in a crash, especially if they're close together (as these would be).

    But yeah, I suppose it makes sense from a readability standpoint.

  2. Former user Account Deleted

    Addressed in Wiki macro error: Changeset 9b903a7ced3e not found.. This doesn't cause the command to show up before cmod's log output, since that is written immediately using L_SYNC.

  3. Log in to comment