Ë
    \;j{
  ã                   ó‚   — d Z ddlZddlZddlZddlZddlmZ i Z ej                  «       ddej                  fd„«       Zy)zh
This code is refer from:
https://github.com/WenmuZhou/PytorchOCR/blob/master/torchocr/utils/logging.py
é    NÚppocrc                 ó  — t        j                  | «      }| t        v r|S t        D ]  }| j                  |«      sŒ|c S  t        j                  dd¬«      }t        j
                  t        j                  ¬«      }|j                  |«       |j                  |«       |�ˆt        j                  «       dk(  rqt        j                  j                  |«      d   }t        j                  |d¬«       t        j                   |d«      }|j                  |«       |j                  |«       t        j                  «       dk(  r|j#                  |«       n|j#                  t         j$                  «       dt        | <   d	|_        |S )
a   Initialize and get a logger by name.
    If the logger has not been initialized, this method will initialize the
    logger by adding one or two handlers, otherwise the initialized logger will
    be directly returned. During initialization, a StreamHandler will always be
    added. If `log_file` is specified a FileHandler will also be added.
    Args:
        name (str): Logger name.
        log_file (str | None): The log filename. If specified, a FileHandler
            will be added to the logger.
        log_level (int): The logger level. Note that only the process of
            rank 0 is affected, and other processes will set the level to
            "Error" thus be silent most of the time.
    Returns:
        logging.Logger: The expected logger.
    z1[%(asctime)s] %(name)s %(levelname)s: %(message)sz%Y/%m/%d %H:%M:%S)Údatefmt)Ústreamr   T)Úexist_okÚaF)ÚloggingÚ	getLoggerÚlogger_initializedÚ
startswithÚ	FormatterÚStreamHandlerÚsysÚstdoutÚsetFormatterÚ
addHandlerÚdistÚget_rankÚosÚpathÚsplitÚmakedirsÚFileHandlerÚsetLevelÚERRORÚ	propagate)	ÚnameÚlog_fileÚ	log_levelÚloggerÚlogger_nameÚ	formatterÚstream_handlerÚlog_file_folderÚfile_handlers	            úfG:\00. PROJECTS\API\Inventory\templateJSON\kerjaOCR\Lib\site-packages\paddleocr/ppocr/utils/logging.pyÚ
get_loggerr'      s/  € ô" ×Ñ˜tÓ$€FØÔ!Ñ!Øˆß)ˆØ�?‰?˜;Õ'ØŠMð *ô ×!Ñ!Ø;ÐEXô€Iô ×*Ñ*´#·*±*Ô=€NØ×Ñ 	Ô*Ø
×Ñ�nÔ%ØÐ¤§¡£°1Ò 4ÜŸ'™'Ÿ-™-¨Ó1°!Ñ4ˆÜ
�‰�O¨dÕ3Ü×*Ñ*¨8°SÓ9ˆØ×!Ñ! )Ô,Ø×Ñ˜,Ô'Ü‡}�}ƒ˜!ÒØ�‰˜	Õ"à�‰œŸ™Ô&Ø#Ô�tÑØ€FÔØ€Mó    )Ú__doc__r   r   r	   Ú	functoolsÚpaddle.distributedÚdistributedr   r   Ú	lru_cacheÚDEBUGr'   © r(   r&   Ú<module>r0      sK   ðñó
 
Û 
Û Û Ý !àÐ ð €×ÑÓØ d°g·m±mò *ó ñ*r(   