Log message: "attempted to set a logger after the logging system was already initialized"
reissseb opened this issue · comments
- portforward version:
0.6.0
- Python version:
3.11.3
- Operating System:
Windows 10
Description
I was setting up a simple port forwarding to a Kubernetes pod. The forwarding works fine, but I get following message in the console output:
attempted to set a logger after the logging system was already initialized
The message also exists with a very simple script without any logging configuration and just using print()
.
Outcommenting the port forwarding does stop printing the above message to the console.
What I Did
import portforward
print("start")
with portforward.forward(
"some-namespace",
"some-pod-name",
29092,
9092,
config_path=the_config_file,
):
print("port forwarding active")
print("done")
console output:
start
port forwarding active
attempted to set a logger after the logging system was already initialized
done
Message is also printed with log_level=portforward.LogLevel.OFF
(I am currently out of spare time but I hope to start working on this soon. But if anyone has interest in fixing it, just drop a note here.)