o
    }o™iÛ  ã                   @   s    d dl Zd dlm Z dd„ ZdS )é    N)Úloggingc                  C   s<   t  d¡} tj ¡ D ]}|  |¡ q
d| _|  tjj	¡ dS )a  Add NeMo handlers to MCore loggers.

    MCore doesn't have and handlers for loggers (see
    https://docs.python.org/3/howto/logging-cookbook.html#adding-handlers-other-than-nullhandler-to-a-logger-in-a-library
    for a rationale). We have to add handlers explicitly.
    zmegatron.coreFN)
Ú_loggingÚ	getLoggerÚnemo_loggerÚ	_handlersÚvaluesÚ
addHandlerÚ	propagateÚsetLevelÚ_loggerÚlevel)Úmcore_loggerÚhandler© r   úK/home/ubuntu/.local/lib/python3.10/site-packages/nemo/utils/mcore_logger.pyÚadd_handlers_to_mcore_logger   s
   
r   )r   r   Ú
nemo.utilsr   r   r   r   r   r   Ú<module>   s   