-
Notifications
You must be signed in to change notification settings - Fork 385
Expand file tree
/
Copy pathlogging.conf
More file actions
62 lines (53 loc) · 1.53 KB
/
logging.conf
File metadata and controls
62 lines (53 loc) · 1.53 KB
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
55
56
57
58
59
60
61
62
#
# The format and semantics of this file are described in this article at Python.org:
#
# [Configuration file format](https://docs.python.org/2/library/logging.config.html#configuration-file-format)
#
[loggers]
keys = root, splunklib, SearchCommand
[logger_root]
# Default: WARNING
level = WARNING
# Default: stderr
handlers = stderr
[logger_splunklib]
qualname = splunklib
# Default: WARNING
level = NOTSET
# Default: stderr
handlers = splunklib
# Default: 1
propagate = 0
[logger_SearchCommand]
qualname = SearchCommand
# Default: WARNING
level = NOTSET
# Default: stderr
handlers = app
# Default: 1
propagate = 0
[handlers]
# See [logging.handlers](https://docs.python.org/2/library/logging.handlers.html)
keys = app, splunklib, stderr
[handler_app]
# Select this handler to log events to app.log
class = logging.handlers.RotatingFileHandler
level = NOTSET
args = ('app.log', 'a', 524288000, 9, 'utf-8', True)
formatter = searchcommands
[handler_splunklib]
# Select this handler to log events to splunklib.log
class = logging.handlers.RotatingFileHandler
args = ('splunklib.log', 'a', 524288000, 9, 'utf-8', True)
level = NOTSET
formatter = searchcommands
[handler_stderr]
# Select this handler to log events to stderr which splunkd redirects to the associated job's search.log file
class = logging.StreamHandler
level = NOTSET
args = (sys.stderr,)
formatter = searchcommands
[formatters]
keys = searchcommands
[formatter_searchcommands]
format = %(asctime)s, Level=%(levelname)s, Pid=%(process)s, File=%(filename)s, Line=%(lineno)s, %(message)s