logg.py: adds comments about protocol logging levels

Signed-off-by: Jed Reynolds <jed@bitratchet.com>
This commit is contained in:
Jed Reynolds
2021-11-29 13:04:37 -08:00
parent 8fccdf3111
commit 10bbe522de

View File

@@ -37,6 +37,16 @@ class Logg:
These reserved words may not be used as tags:
debug, debugging, debug_log, digest, file, gui, http, json, log, method, tag
Protocol logging levels:
* always: X-Errors( stops script on halt_on_errors)
* timeouts: can be configured as halt level errors
- digest (POST set_port / GET /ports )
- url (POST /cli-json/set_port / GET /port/1/2/3/?fields)
- json (POST /cli-json/set_port { a:b } ; GET /port/1/2/3?fields {results interfaces[]}
- http that plus X-Warnings and ALL headers
- gui Xtra debugging messages generated by LANforgeGUI
Please also consider how log messages can be formatted:
https://stackoverflow.com/a/20112491/11014343:
logging.basicConfig(format="[%(filename)s:%(lineno)s - %(funcName)20s() ] %(message)s")