forked from KKodiac/Tello-Python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlogging.config.fileConfig
54 lines (47 loc) · 1.51 KB
/
logging.config.fileConfig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# loggers
[loggers]
keys = root
[logger_root]
name = python-app
level = DEBUG
handlers = console,logstash
propagate = 1
qualname = root
# handlers
[handlers]
keys = console,logstash
[handler_console]
class = StreamHandler
level = NOTSET
formatter = console
args = (sys.stdout,)
[handler_logstash]
class = logstash_async.handler.AsynchronousLogstashHandler
level = DEBUG
formatter = logstash
args = ('%(host)s', %(port)s, '%(database_path)s', '%(transport)s', %(ssl_enable)s, %(ssl_verify)s, '%(keyfile)s', '%(certfile)s', '%(ca_certs)s', %(enable)s)
transport = logstash_async.transport.TcpTransport
host = localhost
port = 5959
enable = True
ssl_enable = True
ssl_verify = True
ca_certs = /etc/ssl/certs/ca.crt
certfile = /etc/ssl/certs/logstash.crt
keyfile = /etc/ssl/private/logstash.key
database_path = /var/lib/logstash.db
[formatters]
keys = console,logstash
[formatter_console]
format = %(asctime)s %(name)-12s %(levelname)+8s %(message)s
[formatter_logstash]
class = logstash_async.formatter.LogstashFormatter
# format, datefmt and style are a hack: we cannot specify "args" for formatters
# (see logging.config.py:111 _create_formatters()), so we pass our values as format parameters
# "format" corresponds to LogstashFormatter's "message_type" argument,
# "datefmt" to "tags" and "style" to "fqdn" ("style" is Python3 only).
# However, the "tags" argument expects a list and "fqdn" expects a boolean but Python's
# logging framework passes strings for both, so this is of limited use.
format = format
datefmt = custom-tag
style = True