Spaces:
Runtime error
Runtime error
Disable logging to file (for lack of suitable place to write log)
Browse files
src/ctp_slack_bot/core/logging.py
CHANGED
@@ -75,16 +75,16 @@ def setup_logging() -> None:
|
|
75 |
)
|
76 |
|
77 |
# Add file handler for non-DEBUG environments.
|
78 |
-
if log_level != "DEBUG":
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
|
89 |
# Intercept standard logging messages.
|
90 |
basicConfig(handlers=[InterceptHandler()], level=0, force=True)
|
|
|
75 |
)
|
76 |
|
77 |
# Add file handler for non-DEBUG environments.
|
78 |
+
# if log_level != "DEBUG":
|
79 |
+
# logger.add(
|
80 |
+
# "/data/app.log",
|
81 |
+
# rotation="10 MB",
|
82 |
+
# retention="1 week",
|
83 |
+
# compression="zip",
|
84 |
+
# format=format_string,
|
85 |
+
# level=log_level,
|
86 |
+
# serialize=(log_format == "json"),
|
87 |
+
# )
|
88 |
|
89 |
# Intercept standard logging messages.
|
90 |
basicConfig(handlers=[InterceptHandler()], level=0, force=True)
|