TextWorld icon indicating copy to clipboard operation
TextWorld copied to clipboard

Glulx game logger

Open taodav opened this issue 7 years ago • 9 comments

Working game logger for the GitGlulxMLGameState.

A few things I've been thinking about for this feature:

  • Maybe we should allow the user to save the logs somewhere with a .save() method that saves to a JSON file?
  • Are the tests enough?

taodav avatar Aug 15 '18 18:08 taodav

@taodav you are right the GameLogger class should implement a save and load (to/from JSON file).

MarcCote avatar Aug 15 '18 18:08 MarcCote

@MarcCote what would the load function do exactly? Only load all the logs?

taodav avatar Aug 15 '18 18:08 taodav

@taodav good point. I guess we should have a separate GameLogger (or another name) class which is saveable/loadable. Then, the wrapper logger environment would just populate a given GameLogger object. That way we would have a logger object that can be loaded separately from the wrapper.

MarcCote avatar Aug 15 '18 18:08 MarcCote

@MarcCote Perhaps GameLog for the log itself?

tavianator avatar Aug 15 '18 18:08 tavianator

@tavianator Haha, that was too obvious. Thanks :+1:

MarcCote avatar Aug 15 '18 18:08 MarcCote

@MarcCote refactored the game logs into a separate class! Also fixed the comments you mentioned above.

taodav avatar Aug 20 '18 23:08 taodav

@MarcCote fixed all the above comments!

taodav avatar Aug 21 '18 15:08 taodav

Also, @tavianator did you say you had an idea for solving the urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) issue we have sometimes when running Travis.

MarcCote avatar Aug 21 '18 16:08 MarcCote

@MarcCote I'll look into codecov.io. In the meantime you can check the Travis logs, they still print out that coverage table at the end.

I'm not sure about the connection reset error, but I'll take a look.

tavianator avatar Aug 21 '18 19:08 tavianator