1212import configparser
1313import csv
1414import logging
15- import logging .handlers
1615import os
1716import sys
1817from datetime import datetime , timedelta
@@ -172,7 +171,7 @@ def _resolve_logging_config(config_path: str) -> configparser.ConfigParser:
172171
173172 Since Python 3.4, fileConfig() accepts a ConfigParser instance directly.
174173 """
175- from rushti .utils import resolve_app_path , makedirs_shared
174+ from rushti .utils import resolve_app_path
176175
177176 cp = configparser .ConfigParser ()
178177 cp .read (config_path )
@@ -216,8 +215,6 @@ def _resolve_logging_config(config_path: str) -> configparser.ConfigParser:
216215 # Use forward slashes — Python handles them on all platforms,
217216 # and avoids backslash escaping issues inside the args string
218217 resolved_fwd = resolved .replace ("\\ " , "/" )
219- # Ensure the target directory exists and is writable
220- makedirs_shared (os .path .dirname (resolved ))
221218 # Replace only the filename portion in the args string
222219 new_args = args_str [: start_idx + 1 ] + resolved_fwd + args_str [end_idx :]
223220 cp .set (section , "args" , new_args )
@@ -235,7 +232,7 @@ def _resolve_logging_config(config_path: str) -> configparser.ConfigParser:
235232 from rushti .utils import ensure_shared_file , makedirs_shared
236233
237234 for handler in logging .root .handlers :
238- if isinstance (handler , logging .handlers . RotatingFileHandler ):
235+ if isinstance (handler , logging .FileHandler ):
239236 makedirs_shared (os .path .dirname (handler .baseFilename ))
240237 ensure_shared_file (handler .baseFilename )
241238
0 commit comments