make it actually function at all

This commit is contained in:
askiiart 2024-02-01 12:34:46 -06:00
parent b7c5b751ea
commit 87e0c8577a
Signed by untrusted user who does not match committer: askiiart
GPG key ID: BC3800E55FB54D67

View file

@ -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()