fix(logging): enforce UTF-8 stdout encoding to support unicode telemetry on Windows
This commit is contained in:
@@ -101,6 +101,10 @@ class TradingBot:
|
||||
|
||||
def _setup_logging(self):
|
||||
"""Configure loguru logging."""
|
||||
if hasattr(sys.stdout, "reconfigure"):
|
||||
sys.stdout.reconfigure(encoding="utf-8")
|
||||
if hasattr(sys.stderr, "reconfigure"):
|
||||
sys.stderr.reconfigure(encoding="utf-8")
|
||||
logger.remove() # Remove default handler
|
||||
|
||||
# Console output
|
||||
|
||||
Reference in New Issue
Block a user