From 10bbe522dedfb4da697bdba6bbd4409c583ed575 Mon Sep 17 00:00:00 2001 From: Jed Reynolds Date: Mon, 29 Nov 2021 13:04:37 -0800 Subject: [PATCH] logg.py: adds comments about protocol logging levels Signed-off-by: Jed Reynolds --- lanforge_client/logg.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lanforge_client/logg.py b/lanforge_client/logg.py index ed165089..d05341d9 100644 --- a/lanforge_client/logg.py +++ b/lanforge_client/logg.py @@ -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")