SW_DebugLog - fablab-wue/piTelex GitHub Wiki
Logging Options
If something doesn't work as expected, there are a few options that can help identify the problem.
Relevant Parameters
Module | Parameter | Default | Type or range | Comment |
---|---|---|---|---|
(Global) | debug | 3 | 1 .... 5 | Debug level (will be deprecated soon) |
(Global) | errorlog_path | error_log | string | Directory path for Error log |
(Global) | errorlog_level | "INFO" | "NOTSET", "DEBUG","INFO", "WARN","ERROR", "CRITICAL" | verbosity of error log (see python manual) |
Log | filename | "log.txt" | string | path to transcript file |
Screen | show_ctrl | true | false / true | if true, show control sequences on screen |
Screen | show_info | false | false / true | if true, show additional info on screen |
Screen | show_BuZi | false | false / true | if true, show special characters for Bu / Zi on screen |
ED1000SC | recv_debug | false | false / true | If true, output recv_debug.log file inside which the respective filter power output levels for every sample are recorded. Use only for debugging (file will grow quickly). |
Error logging
All logged information is saved in a monthly rotating file inside the path given. If the latter is relative, it's interpreted relative to where this Python file is stored. The parameter errorlog_path
specifies the directory where piTelex will put its logging output.
The logging level can be set in telex.json
.
Available loglevels are NOTSET, DEBUG, INFO, WARN, ERROR, CRITICAL. Only log messages that reach or exceed the configured level will produce an entry in the logfile. Standard log level is INFO.
Note: Use DEBUG level with care: Depending on the selected modules the error log can grow rapidly! Keep an eye on your logfile :-)
log
:
Module The above mentioned error logging is different from the function of the log
module. It implements a communication trace log (i.e. it logs the data read from all piTelex modules). To use this kind of logging, include and enable the module and specify the filename of the log file. filename
may be an absolute file path: if given as a relative path, it is related to piTelex' home directory.
This file logs all data and commands (ESC
-*) that run through the central loop, in correct order.
screen
:
Module If enabled, this module can be equipped with more verbosity by setting show_ctrl
, show_BuZi
and/or show_info
to true
.
Module ED1000:
To help identify problems with ED1000 devices, enabling recv_debug
gives you a very verbose log file recv_debug.log
of filter power output levels for every sample.
Miscellaneous
Furthermore, wireshark
is a useful tool for debugging at network level. piTelex' subdirectory tshark
contains some suitable cli scripts; the output can be visualized by wireshark's GUI.