File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -39,9 +39,10 @@ def setupLogging(verbose_level: int = 0):
39
39
"ERROR" : logging .ERROR ,
40
40
"CRITICAL" : logging .CRITICAL ,
41
41
}
42
+
42
43
conf = config ()
43
- assert isinstance ( conf , Config )
44
- if conf .logging :
44
+ # Apparently this can be called in client mode which doesn't have logging
45
+ if isinstance ( conf , Config ) and conf .logging :
45
46
46
47
config_log_level = logging_levels .get (conf .logging .log_level , logging .WARNING )
47
48
# verbose priority:
Original file line number Diff line number Diff line change @@ -29,9 +29,10 @@ def test_loki_logging_handler(httpserver):
29
29
# Configurer l'URL de l'endpoint Loki
30
30
# print(f"http://{httpserver.host}:{httpserver.port}/otlp/v1/logs")
31
31
loki_url = httpserver .url_for ("/otlp/v1/logs" )
32
- config ().logging .OTLP_endpoint = loki_url
32
+ log_conf = config ().logging
33
+ log_conf .OTLP_endpoint = loki_url
33
34
34
- ot_handler = getOpenTelemetryLoggingHandler ()
35
+ ot_handler = getOpenTelemetryLoggingHandler (log_conf )
35
36
36
37
ot_handler .flush ()
37
38
assert len (httpserver .log ) == 0
You can’t perform that action at this time.
0 commit comments