
    y9>iV                         U d Z ddlZddlZddlZddlZddlZddlZddlmZ da	ej
        dz  ed<    ej                    Zej        fddZeddefd	Zdd
ZddZddZdZddZdej        defdZ e             dS )zLogging functions.    N   )configurationloggerreturnc                 V   t          j        t          j                  at          j        |           }dt          j         d}|                    t          j        |                     t                              |           t          	                    t           j
                   dS )zpInitialize the global logger. All log messages will be
    sent to the given stream, default is sys.stderr.
    )streamz%(levelname)s z: %(message)sN)logging	getLoggerr   AppNamer   StreamHandlersetFormatter	Formatter
addHandlersetLevelINFO)r   handlerformats      L/var/www/html/auto_sub_bot/venv/lib/python3.11/site-packages/patoolib/log.pyinit_loggingr      s    
 }455F#6222GBm3BBBF*622333
g
OOGL!!!!!    )encodingc                 F     d                      fd|D                       S )zReplacing unknown characters in args for the given encoding.
    @return: a space-separated string that will not have encoding errors
    with the given encoding
     c                 ~    g | ]9}t          |                              d                                         :S )replace)errors)strencodedecode).0argr   s     r   
<listcomp>zencode_safe.<locals>.<listcomp>2   s=    VVV#S)	4	4	;	;H	E	EVVVr   )join)r   argss   ` r   encode_safer%   ,   s3    
 88VVVVQUVVV  r   c                 f    t           )t                               t          |                      dS dS )zLog error message.N)r   errorr%   msgs    r   	log_errorr*   6   s0    [%%&&&&& r   c                 f    t           )t                               t          |                      dS dS )zLog warning message.N)r   warningr%   r(   s    r   log_warningr-   <   s0    {3''((((( r   c                 f    t           )t                               t          |                      dS dS )zLog info message.N)r   infor%   r(   s    r   log_infor0   B   s0    K$$%%%%% r   )LANGUAGELC_ALLLC_CTYPELANGc                     t          j                    } t          j                            d t
          D                       }t          t                              t          dt          j
         dt          j         dt          j         dt          j         dt          j         dt          j                     d	t!          |            d
t          j         d| dt          j
         d                     dS dS )zPrint internal error message.c                 h    g | ]/}t          j        |          | dt          j        |          0S )N=)osgetenv)r    keys     r   r"   z&log_internal_error.<locals>.<listcomp>P   s;    VVV29S>>;UC	$	$")C..	$	$;U;U;Ur   NzT********** Oops, I did it again. *************

You have found an internal error in z.
Please write a bug report at
z
and include at least the information below:

Not disclosing some of the information below due to privacy reasons is ok.
I will try to help you nonetheless, but you have to give me something
I can work with ;) .

z
Python z on z
Platform: z
Local time: z
sys.orig_argv: z
Environment:
z

******** z' internal error, over and out ********
)time	localtimer8   linesepr#   EnvKeysr   	exceptionr%   r   r   
SupportUrlAppsysversionplatformstrtime	orig_argv)nowenvs     r   log_internal_errorrI   L   s3   
.

C
*//VVVVV C %2%:  	    	      S\\   " # $ 
%   	
 	
 	
 	
 	
 r   tc                 ,    t          j        d|           S )zReturn ISO 8601 formatted time.z%Y-%m-%d %H:%M:%S%z)r;   strftime)rJ   s    r   rE   rE   m   s    =.222r   )r   N)__doc__r8   rB   r;   localer	   rD    r   r   Logger__annotations__getpreferredencodingdefault_encodingstderrr   r   r%   r*   r-   r0   r>   rI   struct_timerE    r   r   <module>rW      sZ      				 



           !% $ $ $.6.00  
 
" 
" 
" 
" 
" !1   S    ' ' ' ') ) ) )& & & & 5
 
 
 
B3t 3C 3 3 3 3
 r   