@@ -153,7 +153,7 @@ def is_older_than_x_days(path: str, days: int) -> bool:
153153
154154# Cache stderr timezone for better performance
155155@lru_cache (maxsize = 1 )
156- def _get_stderr_timezone ():
156+ def get_stderr_timezone ():
157157 timezone_name = os .getenv ("LOG_TIMEZONE" , "UTC" )
158158 if timezone_name .lower () == "localtime" :
159159 return None # Use system local timezone
@@ -167,7 +167,7 @@ def _get_stderr_timezone():
167167def write_stderr (msg : str ) -> None :
168168 """Write msg to stderr with optimized timezone handling"""
169169 try :
170- tz = _get_stderr_timezone ()
170+ tz = get_stderr_timezone ()
171171 if tz is None :
172172 # Use local timezone
173173 dt = datetime .now ()
@@ -206,7 +206,7 @@ def get_log_path(directory: str, filename: str) -> str:
206206
207207
208208@lru_cache (maxsize = 32 )
209- def _get_timezone_offset (timezone_ : str ) -> str :
209+ def get_timezone_offset (timezone_ : str ) -> str :
210210 """Cache timezone offset calculation with fallback for missing timezone data"""
211211 if timezone_ .lower () == "localtime" :
212212 return time .strftime ("%z" )
@@ -230,7 +230,7 @@ def get_format(show_location: bool, name: str, timezone_: str) -> str:
230230 if show_location :
231231 _debug_fmt = "[%(filename)s:%(funcName)s:%(lineno)d]:"
232232
233- utc_offset = _get_timezone_offset (timezone_ )
233+ utc_offset = get_timezone_offset (timezone_ )
234234 return f"[%(asctime)s.%(msecs)03d{ utc_offset } ]:[%(levelname)s]:{ _logger_name } { _debug_fmt } %(message)s"
235235
236236
0 commit comments