updog-logging_template/logging_template.py

8 lines
284 B
Python
Raw Normal View History

2024-01-31 18:22:20 -06:00
class LoggingTemplate:
# there's no close() and that might cause some issues
def __init__(self, arguments):
self.log_file = open(arguments['file'], 'wt')
def log(self, service_name, code, status):
self.log_file.write(f'{service_name} {code}: {status}\n')