@@ -29,9 +29,9 @@ class LoggerLoader:
2929 Attributes:
3030 _CONFIG_PATH (str): Default config file path. Default is '${PWD}/configs/logger.yml'.
3131
32- handlers_map (dict[str, int]): Map of handler names to their IDs. Default is {'default.loguru_handler': 0}.
33- config (LoggerConfigPM): Main logger configuration model. Default is LoggerConfigPM().
34- config_file_path (str ): Path to logger configuration file. Default is _CONFIG_PATH.
32+ handlers_map (dict[str, int]): Map of handler names to their IDs. Default is {'default.loguru_handler': 0}.
33+ config (LoggerConfigPM): Main logger configuration model. Default is LoggerConfigPM().
34+ config_path (str ): Path to logger configuration file. Default is _CONFIG_PATH.
3535
3636 Methods:
3737 load() : Load logger handlers based on logger config.
@@ -253,40 +253,40 @@ def config(self, config: LoggerConfigPM | dict[str, Any]) -> None:
253253
254254 # config
255255
256- # config_file_path
256+ # config_path
257257 @property
258- def config_file_path (self ) -> str :
258+ def config_path (self ) -> str :
259259 try :
260- return self .__config_file_path
260+ return self .__config_path
261261 except AttributeError :
262- self .__config_file_path = LoggerLoader ._CONFIG_PATH
262+ self .__config_path = LoggerLoader ._CONFIG_PATH
263263
264- return self .__config_file_path
264+ return self .__config_path
265265
266- @config_file_path .setter
267- def config_file_path (self , config_file_path : str ) -> None :
268- if not isinstance (config_file_path , str ):
266+ @config_path .setter
267+ def config_path (self , config_path : str ) -> None :
268+ if not isinstance (config_path , str ):
269269 raise TypeError (
270- f"`config_file_path ` attribute type { type (config_file_path )} is invalid, must be a <str>!"
270+ f"`config_path ` attribute type { type (config_path )} is invalid, must be a <str>!"
271271 )
272272
273- config_file_path = config_file_path .strip ()
274- if config_file_path == "" :
275- raise ValueError ("`config_file_path ` attribute value is empty!" )
273+ config_path = config_path .strip ()
274+ if config_path == "" :
275+ raise ValueError ("`config_path ` attribute value is empty!" )
276276
277277 if (
278- (not config_file_path .lower ().endswith ((".yml" , ".yaml" )))
279- and (not config_file_path .lower ().endswith (".json" ))
280- and (not config_file_path .lower ().endswith (".toml" ))
278+ (not config_path .lower ().endswith ((".yml" , ".yaml" )))
279+ and (not config_path .lower ().endswith (".json" ))
280+ and (not config_path .lower ().endswith (".toml" ))
281281 ):
282282 raise ValueError (
283- f"`config_file_path ` attribute value '{ config_file_path } ' is invalid, "
283+ f"`config_path ` attribute value '{ config_path } ' is invalid, "
284284 f"file must be '.yml', '.yaml', '.json' or '.toml' format!"
285285 )
286286
287- self .__config_file_path = config_file_path
287+ self .__config_path = config_path
288288
289- # config_file_path
289+ # config_path
290290 # ATTRIBUTES
291291
292292
0 commit comments