๐Ÿ“œLogger

The Logger object logs API calls made using Odin's Spear.

Details logged are: Date/ Time, Name (Odin's Spear), User (You the developer), response code, endpoint.

Logs are sent to os.log by default but can be changed in set_up_file_handler() method. Logs can also be sent to an external syslog server using the set_up_sys_log_handler method.

from odin_api import api

my_api = api.Api(base_url="https://base_url/api/vx", username="john.smith", password="ODIN_INSTANCE_1")
my_api.authenticate()

my_api.logger.set_up_file_handler()
my_api.logger.set_up_syslog_handler()

Last updated