Skip to content

Live logging - #28

Closed
NHTangles wants to merge 12 commits into
NetHack:NetHack-3.6.0from
NHTangles:NetHack-3.6.0
Closed

NHTangles wants to merge 12 commits into
NetHack:NetHack-3.6.0from
NHTangles:NetHack-3.6.0

Conversation

@NHTangles

Copy link
Copy Markdown
Contributor

Live logging patch as discussed on #nethack-dev over the last few days.

  1. Pulled livelog_write_string(), etc from 3.4.3-nao patch set.
    1a. Changed the livelog separator from ':' to '\t' for consistency with xlogfile.
  2. Added sysconf option to control what types of messages (if any) to log, and introduced livelog types, which are passed as an additional arg to livelog_write_string(), and compared to the sysconf-configured types to determine whether or not to actually log the message.
  3. Added LIVELOG_ENABLE to config.h to allow enable/disable at compile time.
  4. Added livelog_printf() as a wrapper to livelog_write_string(), which does the obvious.
  5. Added code to actually log messages as per 3.4.3-nao livelogging, and also achievements, unique kills, sacrifice gifts, crownings, broken conducts (there are a lot of these), and new levels.

Please consider :)

NHTangles and others added 12 commits February 4, 2017 00:00
Added a sysconf option to enable live logging of various in-game events
The value of this option is a bit-field that can be modified to control
which events are logged.
Also, added the actual logging functions, obviously.

TODO: Make the wording of the log messages less lame.
Enable by setting desired value in sysconf, and uncommenting
LIVELOG_ENABLE in config.h
Also removed redundant LIVELOG_ENABLE macro.  Feature is now
enabled by defining LIVELOGFILE (as is done with XLOG, NEWS, etc)
Fixed typo in comment in config.h - thanks paxed.
Added a sysconf option LLC_TURNS to stop spammy livelogging of
breaking conducts in the early game.

Fixed #if DUMPLOG

(cherry picked from commit c5fc5f8)
Z

(cherry picked from commit 6b0cb46)
THis line was accidentally deleted in a botched merge earlier
@NHTangles

Copy link
Copy Markdown
Contributor Author

Closing this one to reopen on a feature branch with some improvements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant