Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@chelseatroy
Last active December 24, 2019 15:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chelseatroy/e7faf9ae602215b1d2bd9c13f053c904 to your computer and use it in GitHub Desktop.
Save chelseatroy/e7faf9ae602215b1d2bd9c13f053c904 to your computer and use it in GitHub Desktop.
key_value_store.py
class KeyValueStore:
...
def write_to_log(self, string_operation, path_to_logs=''):
if path_to_logs == '':
path_to_logs = "logs/" + self.server_name + "_log.txt"
f = open(path_to_logs, "a+")
f.write(string_operation + '\n')
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment