1 | ; Stitcher logging config file |
---|
2 | |
---|
3 | ; For format info, see |
---|
4 | ; http://docs.python.org/library/logging.config.html#configuration-file-format |
---|
5 | |
---|
6 | ; For built-in variables available in formatters, see |
---|
7 | ; http://docs.python.org/library/logging.html#logrecord-attributes |
---|
8 | |
---|
9 | ; Note the special variable 'optlevel' below: If you use it, that means |
---|
10 | ; take the log level computed from the command line. Specifically, log |
---|
11 | ; at INFO usually, and at DEBUG if --debug is given on the command line. |
---|
12 | |
---|
13 | ; Also note use of logfilename set with --logoutput |
---|
14 | |
---|
15 | [loggers] |
---|
16 | ; Add other loggers in a comma separated list. |
---|
17 | keys=root,omni |
---|
18 | |
---|
19 | [handlers] |
---|
20 | ; Add other handlers in a comma separated list. |
---|
21 | keys=consoleHandler,omniconsoleHandler,fileHandler |
---|
22 | |
---|
23 | [formatters] |
---|
24 | keys=defaultConsoleFormatter,detailFormatter |
---|
25 | |
---|
26 | ; By default, everything goes to console and a file |
---|
27 | [logger_root] |
---|
28 | level=NOTSET ; Log everything |
---|
29 | ; %(optlevel)s ; Usually, INFO. DEBUG if --debug option specified. |
---|
30 | handlers=consoleHandler,fileHandler |
---|
31 | |
---|
32 | ; Omni stuff goes to console and file, but less goes to console |
---|
33 | [logger_omni] |
---|
34 | ;level=WARN |
---|
35 | handlers=omniconsoleHandler,fileHandler |
---|
36 | ; qualname is how the code retrieves the logger instance |
---|
37 | ; Other values: omni.framework, omni.protogeni, omni.sfa, omni.credparsing, cred-verifier |
---|
38 | qualname=omni |
---|
39 | ; set propagate=1 if you want parent loggers to also get the log messages |
---|
40 | ; But here set to 0 so the root logger doesn't duplicate messages |
---|
41 | propagate=0 |
---|
42 | |
---|
43 | [handler_consoleHandler] |
---|
44 | class=StreamHandler |
---|
45 | level=%(optlevel)s ; Log only to the level specified with --debug, etc |
---|
46 | formatter=defaultConsoleFormatter |
---|
47 | args=(sys.stdout,) |
---|
48 | |
---|
49 | ; Log only at WARN level omni stuff to console |
---|
50 | [handler_omniconsoleHandler] |
---|
51 | class=StreamHandler |
---|
52 | level=WARN |
---|
53 | formatter=defaultConsoleFormatter |
---|
54 | args=(sys.stdout,) |
---|
55 | |
---|
56 | ; Log everything to a file |
---|
57 | [handler_fileHandler] |
---|
58 | class=FileHandler |
---|
59 | level=NOTSET ; Log everything |
---|
60 | formatter=detailFormatter |
---|
61 | ; logfilename is from the --logoutput option, default is omni.log for oscript, stitcher.log for stitcher |
---|
62 | args=('%(logfilename)s',) |
---|
63 | |
---|
64 | ; The default format you get for a console logger |
---|
65 | [formatter_defaultConsoleFormatter] |
---|
66 | format=%(asctime)s %(levelname)-8s: %(message)s |
---|
67 | datefmt=%H:%M:%S |
---|
68 | |
---|
69 | ; Add the filename, function, line# if known |
---|
70 | [formatter_detailFormatter] |
---|
71 | ; %(funcName)s |
---|
72 | ; %(pathname)s of source file |
---|
73 | ; %(names)s of logger |
---|
74 | format=%(asctime)s %(levelname)-8s %(filename)s:%(lineno)d %(message)s |
---|
75 | datefmt=%m/%d %H:%M:%S |
---|