更新 chassis

This commit is contained in:
BryantHe 2023-05-31 03:30:04 +08:00
parent 36aa73884c
commit e4442bbb73
1 changed files with 4 additions and 6 deletions

View File

@ -1,15 +1,12 @@
import logging
from logstash_formatter import LogstashFormatterV1
from statsd import StatsClient
from nameko_sentry import SentryReporter
def init_statsd(prefix=None, host=None, port=8125): def init_statsd(prefix=None, host=None, port=8125):
from statsd import StatsClient
statsd = StatsClient(host, port, prefix=prefix) statsd = StatsClient(host, port, prefix=prefix)
return statsd return statsd
def init_logger(): def init_logger():
import logging
from logstash_formatter import LogstashFormatterV1
logger = logging.getLogger() logger = logging.getLogger()
handler = logging.StreamHandler() handler = logging.StreamHandler()
formatter = LogstashFormatterV1() formatter = LogstashFormatterV1()
@ -19,4 +16,5 @@ def init_logger():
def init_sentry(): def init_sentry():
from nameko_sentry import SentryReporter
return SentryReporter() return SentryReporter()