+
     i  c                   s   R t ^ RIt^ RIt^ RIHt ^ RIHt  ^ RIHt ]P                  ! 4       t
RtRs ! R R]P                  4      t]P                  4       tRtRt ^ RIt]P&                  ! R	4      ^ ,          P(                  tR]9   tR#   ]	 d    Rt Lxi ; i  ] d-   t]P/                  R
4       ]P1                  ]4        RtALDRtAii ; i)z!Logging setup for input-remapper.N)cast)ColorfulFormatter)COMMIT_HASHZ c                   s|   a  ] tR t^(t o R tR tR tV 3R lR ltRV 3R lR lltV 3R lR	 lt	]
R
 4       tRtV tR# )Loggerc                s
   V P                  \        P                  4      '       g   R# V P                  V4      pV FD  pRpWC^,          ,          V^ ,          ,           pV P	                  \        P                  VRR7       KF  	  R# )z4Parse the structure of a mapping_handler and log it.Nz    )args)isEnabledForloggingDEBUG_parse_mapping_handler_log)selfmapping_handlerlines_and_indentlineindentmsgs   &&    A/usr/lib/python3.14/site-packages/inputremapper/logging/logger.pydebug_mapping_handlerZLogger.debug_mapping_handler)   se      //66G$DF7"T!W,CIIgmmStI4 %    c                s   V P                  \        P                  4      '       g   R# \        V4      pVP	                  RR4      pRV RVP
                   R2pV\        8X  d   R# VsV P                  \        P                  VR^R7       R# )zLog that an event is being written

Parameters
----------
key
    anything that can be string formatted, but usually a tuple of
    (type, code, value) tuples
Nz,)Z)zWriting z to "Z")r   Z
stacklevel)r   r   r   reprZreplacenameprevious_write_debug_logr	   )r
   ZkeyZuinputZstr_keyr   s   &&&  r   writeZLogger.write4   sy       // s)//$,	v{{m15**#& 		'--4A	>r   c                s\   ^ p. p \        V\        4      '       dM   V FC  pV P                  V4      pV F  pV^;;,          V,          uu&   K  	  VP                  V4       KE  	   V# VP	                  \        V4      V.4        VP                  pT^,          pK    \         d     T# i ; i)i    )Z
isinstanceZlistr   ZextendZappendr   ZchildZAttributeError)r
   r   r   r   Zsub_handlerZsub_listr   s   &&     r   r   ZLogger._parse_mapping_handlerP   s    /400#2K#::;GH (Q6) !)$++H5	 $3
    ##T/%:F$CD"1"7"7 aKF "   	s   B B+*B+c                s    < V ^8  d   QhRS[ /# )   returnZboolZformat__classdict__   "r   __annotate__Logger.__annotate__e   s     + +$ +r   c                s<    V P                   \        P                  8*  # )z/True, if the logger is currently in DEBUG mode.)Zlevelr   r   )r
   s   &r   is_debugZLogger.is_debuge   s    zzW]]**r   c                $   < V ^8  d   QhRS[ RR/# )r   r   r   N)Zstrr   r   r   r   r   i   s      S  r   c                s    \         P                  RV\        \        4       \        '       d   \         P                  R\        4       V P                  4       '       d   \         P                  R4       R# R# )z$Log version and name to the console.z3%s %s %s https://github.com/sezanzeb/input-remapperzpython-evdev %szDebug level will log all your keystrokes! Do not post this output in the internet if you typed in sensitive or private information with your device!N)loggerinfoVERSIONr   EVDEV_VERSIONr   Zwarning)r
   r   s   &&r   log_infoZLogger.log_infoi   sQ    A		
 =KK)=9==??NN0 r   c                r    )r   debugr   Nr   r   r   r   r   r   |   s     ; ;d ;t ;r   c                s    V'       d!   V P                  \        P                  4       MV P                  \        P                  4       V P                   F  pVP                  \        V4      4       K  	  R# )z;Set the logging verbosity according to the settings object.N)setLevelr   r   INFOZhandlerssetFormatterr   )r
   r&   handlers   && r   update_verbosityZLogger.update_verbosity|   sG    MM'--(MM',,'}}G  !25!9: %r   c                s   \         P                  ! V 4       \        V \         P                  ! R 4      4      p\         P                  ! 4       pVP                  \        R4      4       VP                  V4       VP                  \         P                  4       \         P                  ! R4      P                  \         P                  4       V# )input-remapperFZasyncio)r   ZsetLoggerClassr    Z	getLoggerZStreamHandlerr)   r   Z
addHandlerr'   r(   ZWARNING)Zclsr!   r*   s   &  r   bootstrap_loggerZLogger.bootstrap_logger   s     	s#c7,,-=>?'').u56'"%)$--goo>r    N)r,   )Z__name__Z
__module__Z__qualname__Z__firstlineno__r   r   r   r   r%   r+   Zclassmethodr-   Z__static_attributes__Z__classdictcell__)r   s   @r   r   r   (   sF     	5?8 *+ + &; ; 
 
r   r   z2.2.0Zevdevz Could not figure out the versionZbeta)Z__doc__r   ZtimeZtypingr    Zinputremapper.logging.formatterr   Zinputremapper.commit_hashr   ZImportErrorZstartZprevious_key_debug_logr   r   r-   r!   r#   r$   Zpkg_resourcesZrequireZversionZ	ExceptionZerrorr"   r&   ZIS_BETAr.   r   r   <module>r/      s   ( (    =5
 			  iW^^ iX 
	 	 	"
 
!))'215==M G
U  KD   KK23
LLs)   B 'B 	BBC!"CC