Compare commits

..

1 Commits

Author SHA1 Message Date
Tobias Hodapp 014fd78b98 Added more documentation to the code
Fixed typos and changed class names to fit the coding convention
2023-08-22 22:56:57 +02:00
1 changed files with 2 additions and 3 deletions

View File

@ -1,8 +1,8 @@
import json
import logging
import os
import platform
import time
import os
import requests
@ -20,7 +20,7 @@ MONITOR_STATE_TO_LOKI = {
MAX_BUFFER_LINES = 100
class Loki_log_buffer:
class Loki_log_buffer():
'''
A log buffer that allows to output the logs as loki requests in json. Allows
adding labels to the log stream and takes care of communication with loki.
@ -73,7 +73,6 @@ class Loki_log_buffer:
except requests.RequestException:
logger.warning('Failed to upload logs to loki')
class Loki_log_handler(logging.Handler):
'''
A log handler that sends logs to loki.