We are logging events on two different levels: warnings and errors. This can be expanded as needed.
When we log something it gets put into a logging file belonging to the service that logged it. It will also be send to the health api, from where further processing and information sharing will be handled.
We are logging as much detail as possible since these logs are mainly for technical eyes. Example of an log entry:
ERROR:2024-05-31 10:06:47,983:xd.py:message from devs:(<class 'FileNotFoundError'>, FileNotFoundError(2, 'No such file or directory'), <traceback object at 0x000001D8EAF92D00>)
Traceback (most recent call last):
File "c:\Users\tvs157\Desktop\VSC_projects\LoggingExperimentation\main.py", line 67, in
with open("/shda") as f:
^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/shda'
So it consists of the level of severity, timestamp, file that logged it, any message we decide to put, any exception caught.
We are using the "logging" library.
We are logging events on two different levels: warnings and errors. This can be expanded as needed.
When we log something it gets put into a logging file belonging to the service that logged it. It will also be send to the health api, from where further processing and information sharing will be handled.
We are logging as much detail as possible since these logs are mainly for technical eyes. Example of an log entry: ERROR:2024-05-31 10:06:47,983:xd.py:message from devs:(<class 'FileNotFoundError'>, FileNotFoundError(2, 'No such file or directory'), <traceback object at 0x000001D8EAF92D00>) Traceback (most recent call last): File "c:\Users\tvs157\Desktop\VSC_projects\LoggingExperimentation\main.py", line 67, in
with open("/shda") as f:
^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/shda'
So it consists of the level of severity, timestamp, file that logged it, any message we decide to put, any exception caught.