mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-05-03 20:32:38 +02:00
Loki logging (#586)
* Consolidate logging into a single module * Added Loki logging * Update tech spec * Add processor label * Fix recursive log entries, logging Loki"s internals
This commit is contained in:
parent
39f6a8b940
commit
f12fcc2652
9 changed files with 415 additions and 80 deletions
|
|
@ -9,7 +9,7 @@ from aiohttp import web
|
|||
import logging
|
||||
import os
|
||||
|
||||
from .. log_level import LogLevel
|
||||
from trustgraph.base.logging import setup_logging
|
||||
|
||||
from . auth import Authenticator
|
||||
from . config.receiver import ConfigReceiver
|
||||
|
|
@ -29,7 +29,6 @@ from .. schema import (
|
|||
)
|
||||
|
||||
logger = logging.getLogger("api")
|
||||
logger.setLevel(logging.INFO)
|
||||
|
||||
default_pulsar_host = os.getenv("PULSAR_HOST", "pulsar://pulsar:6650")
|
||||
default_prometheus_url = os.getenv("PROMETHEUS_URL", "http://prometheus:9090")
|
||||
|
|
@ -285,6 +284,9 @@ def run():
|
|||
args = parser.parse_args()
|
||||
args = vars(args)
|
||||
|
||||
# Setup logging before creating API instance
|
||||
setup_logging(args)
|
||||
|
||||
if args["metrics"]:
|
||||
start_http_server(args["metrics_port"])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue