Previous topic

Heterogeneous Relation Graphs Example

Next topic

Voice Loading

Python Logging ConfigurationΒΆ

An example Python logging configuration (see Python documentation on configuration file formats for the logging.fileConfig() method) for a Speect logger as described in Logging. It can also be found at speect/swig/python/spct_python_log.conf.

 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
[loggers]
keys=root,SpeectEngine

[handlers]
keys=consoleHandler

[formatters]
keys=simpleFormatter

[logger_root]
level=DEBUG
handlers=consoleHandler

[logger_SpeectEngine]
level=DEBUG
handlers=consoleHandler
qualname=Speect Engine
propagate=0

[handler_consoleHandler]
class=StreamHandler
level=DEBUG
formatter=simpleFormatter
args=(sys.stdout,)


# Variables available to formatter are:
#    se_event : Speect Engine Event (ERROR, WARNING, ...)
#    se_function : Speect Engine function where event took place
#    se_file     : Speect Engine file where event took place
#    se_line     : Speect Engine line number in file where event took place
#    se_user_msg : Speect Engine user message of event that took place

[formatter_simpleFormatter]
format= %(name)s [%(se_event)s (%(message)s)] %(se_user_msg)s
datefmt=