2024-01-31 18:22:20 -06:00
|
|
|
class LoggingTemplate:
|
|
|
|
def __init__(self, arguments):
|
2024-02-01 12:34:46 -06:00
|
|
|
self.log_filename = arguments['file']
|
2024-01-31 18:22:20 -06:00
|
|
|
|
|
|
|
def log(self, service_name, code, status):
|
2024-02-01 12:34:46 -06:00
|
|
|
# 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()
|