Skip to content

Commit

Permalink
Remove logzio
Browse files Browse the repository at this point in the history
  • Loading branch information
vladsavelyev committed Jul 2, 2024
1 parent 25360ae commit 2e0ba43
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from pathlib import Path

from dotenv import load_dotenv
from logzio.handler import LogzioHandler
from logging.handlers import RotatingFileHandler

load_dotenv()
Expand All @@ -18,7 +17,7 @@
logger = logging.getLogger("multiqc_api")
logger.setLevel(logging.DEBUG)

formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
fh = RotatingFileHandler(log_path, maxBytes=10_000, backupCount=10)
fh.setLevel(logging.DEBUG)
fh.setFormatter(formatter)
Expand All @@ -30,11 +29,4 @@
ch.setFormatter(formatter)
logger.addHandler(ch)

logzio_token = os.getenv("LOGZIO_TOKEN")
if logzio_token:
logz_handler = LogzioHandler(logzio_token)
logz_handler.setFormatter(formatter)
logz_handler.setLevel(logging.DEBUG)
logger.addHandler(logz_handler)

logger.info(f"Logging to {log_path}")

0 comments on commit 2e0ba43

Please sign in to comment.