wL i4dZddlZddlZddlmZmZmZmZmZmZm Z m Z ddl m Z ddl mZejejejej ejdZejZdefd Zdej&fd Zd Zdd Zdd Zdde edej&fdZdefdZdeddfdZdZdZdZdZddZ ddZ!eejDreyy)zLogging utilities.N)CRITICALDEBUGERRORFATALINFONOTSETWARNWARNING)Optional) constants)debuginfowarningerrorcriticalreturnc2tjddS)N.r)__name__splitc/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/huggingface_hub/utils/logging.py_get_library_namer-s >># q !!rc<tjtSN)logging getLoggerrrrr_get_library_root_loggerr 1s   .0 11rc tjdd}|r[|tvr t|Stjj d|ddj tjtS)z If `HF_HUB_VERBOSITY` env var is set to one of the valid choices return that as the new default level. If it is not - fall back to `_default_log_level` HF_HUB_VERBOSITYNz Unknown option HF_HUB_VERBOSITY=z, has to be one of: z, ) osgetenv log_levelsrrrjoinkeys_default_log_level) env_level_strs r_get_default_logging_levelr*5sr II0$7M J &m, ,     ' '2=/AUVZV_V_`j`o`o`qVrUst  rct}|jtj|j t yr)r addHandlerr StreamHandlersetLevelr*library_root_loggers r_configure_library_root_loggerr1Es424""7#8#8#:;  !;!=>rcVt}|jtjyr)r r.rrr/s r_reset_library_root_loggerr3Ks24  0rnamecD| t}tj|S)a Returns a logger with the specified name. This function is not supposed to be directly accessed by library users. Args: name (`str`, *optional*): The name of the logger to get, usually the filename Example: ```python >>> from huggingface_hub import get_logger >>> logger = get_logger(__file__) >>> logger.set_verbosity_info() ``` )rrr)r4s r get_loggerr6Ps"& | "   T ""rc2tjS)aReturn the current level for the HuggingFace Hub's root logger. Returns: Logging level, e.g., `huggingface_hub.logging.DEBUG` and `huggingface_hub.logging.INFO`. > [!TIP] > HuggingFace Hub has following logging levels: > > - `huggingface_hub.logging.CRITICAL`, `huggingface_hub.logging.FATAL` > - `huggingface_hub.logging.ERROR` > - `huggingface_hub.logging.WARNING`, `huggingface_hub.logging.WARN` > - `huggingface_hub.logging.INFO` > - `huggingface_hub.logging.DEBUG` )r getEffectiveLevelrrr get_verbosityr9is $ % 7 7 99r verbosityc6tj|y)z Sets the level for the HuggingFace Hub's root logger. Args: verbosity (`int`): Logging level, e.g., `huggingface_hub.logging.DEBUG` and `huggingface_hub.logging.INFO`. N)r r.)r:s r set_verbosityr<|s'' 2rc ttS)z/ Sets the verbosity to `logging.INFO`. )r<rrrrset_verbosity_infor>s  rc ttS)z2 Sets the verbosity to `logging.WARNING`. )r<r rrrset_verbosity_warningr@s  !!rc ttS)z0 Sets the verbosity to `logging.DEBUG`. )r<rrrrset_verbosity_debugrB  rc ttS)z0 Sets the verbosity to `logging.ERROR`. )r<rrrrset_verbosity_errorrErCrc"dt_y)zo Disable propagation of the library log outputs. Note that log propagation is disabled by default. FNr propagaterrrdisable_propagationrIs ,1(rc"dt_y)z Enable propagation of the library log outputs. Please disable the HuggingFace Hub's default handler to prevent double logging if the root logger has been configured. TNrGrrrenable_propagationrKs ,0(r)rNr)#__doc__rr#rrrrrrr r typingr r r%r(strrLoggerr r*r1r3r6intr9r<r>r@rBrErIrKHF_DEBUGrrrrSs    ]] LL ]]   __"3"2'..2  ? 1 #Xc]#gnn#2:s:& 3S 3T 3"  10  r