mirror of
https://gitea.bearcatlog.com/Bryant/chassis
synced 2025-01-18 19:03:26 +08:00
更新 chassis
This commit is contained in:
parent
36aa73884c
commit
e4442bbb73
@ -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):
|
||||
from statsd import StatsClient
|
||||
statsd = StatsClient(host, port, prefix=prefix)
|
||||
return statsd
|
||||
|
||||
|
||||
def init_logger():
|
||||
import logging
|
||||
from logstash_formatter import LogstashFormatterV1
|
||||
logger = logging.getLogger()
|
||||
handler = logging.StreamHandler()
|
||||
formatter = LogstashFormatterV1()
|
||||
@ -19,4 +16,5 @@ def init_logger():
|
||||
|
||||
|
||||
def init_sentry():
|
||||
from nameko_sentry import SentryReporter
|
||||
return SentryReporter()
|
||||
|
Loading…
Reference in New Issue
Block a user