make it actually function at all
This commit is contained in:
parent
b7c5b751ea
commit
87e0c8577a
1 changed files with 5 additions and 3 deletions
|
@ -1,7 +1,9 @@
|
|||
class LoggingTemplate:
|
||||
# there's no close() and that might cause some issues
|
||||
def __init__(self, arguments):
|
||||
self.log_file = open(arguments['file'], 'wt')
|
||||
self.log_filename = arguments['file']
|
||||
|
||||
def log(self, service_name, code, status):
|
||||
self.log_file.write(f'{service_name} {code}: {status}\n')
|
||||
# there's definitely a better way to do this but i'm not gonna bother
|
||||
log_file = open(self.log_filename, 'at')
|
||||
log_file.write(f'{service_name} {code}: {status}\n')
|
||||
log_file.close()
|
||||
|
|
Loading…
Reference in a new issue