+
    }io              
      N   ^ RI Ht ^ RIt^ RIt^ RIt^ RIt^ RIHtHt ^ RI	H
t
HtHt ^ RIHt ^ RIHt ]'       d   ^ RIHt ]! 4        ]
P&                  t]P*                  ]
P,                  ]P.                  ]
P0                  ]P2                  ]
P4                  ]P6                  ]
P8                  ]P:                  ]
P8                  /t]P*                  R]P.                  R	]P2                  R
]P6                  R/tRt R R lt!R R lt"RR/R R llt# ! R R]PH                  4      t%R# )    )annotationsN)TYPE_CHECKINGAny)ForeStylejust_fix_windows_console)assert_never)service_locator)LogLevelDEBUGzINFO zWARN ERRORc                    V ^8  d   QhRRRR/# )   levelr   returnint )formats   "e/Users/ahmad/.openclaw/workspace/my-crawler/.venv/lib/python3.14/site-packages/crawlee/_log_config.py__annotate__r   )   s      x C     c                   V R8X  d   \         P                  # V R8X  d   \         P                  # V R8X  d   \         P                  # V R8X  d   \         P                  # V R8X  d   \         P
                  # \        V 4       R# )zGConvert a string representation of a log level to an integer log level.r   INFOWARNINGr   CRITICALN)loggingr   r   r   r   r   r	   )r   s   &r   string_to_log_levelr   )   se    }}||	}}
r   c                   V ^8  d   QhRR/# )r   r   r   r   )r   s   "r   r   r   9   s     	 	# 	r   c                     \         P                  ! 4       p R V P                  9   d   \        V P                  4      # \
        P                  P                  '       d   \        P                  # \        P                  # )	log_level)r
   get_configurationmodel_fields_setr   r    sysflagsdev_moder   r   r   )configs    r   get_configured_log_levelr'   9   sS    ..0Ff---"6#3#344
yy}}<<r   remove_old_handlersFc               $    V ^8  d   QhRRRRRR/# )r   loggerzlogging.Loggerr(   boolr   Noner   )r   s   "r   r   r   E   s"      ^ T VZ r   c               *   \         P                  ! 4       pVP                  \        4       4       V'       d,   V P                  R ,           F  pV P                  V4       K  	  V P                  V4       V P                  \        4       4       RV n	        R# ):NNNFN)
r   StreamHandlersetFormatterCrawleeLogFormatterhandlersremoveHandler
addHandlersetLevelr'   	propagate)r*   r(   handlerold_handlers   &$  r   configure_loggerr8   E   ss    ##%G,./!??1--K  - . g
OO,./ Fr   c            	         a  ] tR t^TtRt]P                  ! R^ R^ RRR4      tRR V 3R llltR R lt	R V 3R	 llt
R
tV ;t# )r0   a  Log formatter that prints out the log message nicely formatted, with colored level and stringified extra fields.

It formats the log records so that they:
    - start with the level (colorized, and padded to 5 chars so that it is nicely aligned)
    - then have the actual log message, if it's multiline then it's nicely indented
    - then have the stringified extra log fields
    - then, if an exception is a part of the log record, prints the formatted exception.
dummyNc               (    V ^8  d   QhRRRRRRRR/# )r   include_logger_namer+   argsr   kwargsr   r,   r   )r   s   "r   r    CrawleeLogFormatter.__annotate__d   s2     7 7!7 7 	7
 
7r   c                4   < \         SV `  ! V/ VB  Wn        R# )zInitialize a new instance.

Args:
    include_logger_name: Include logger name at the beginning of the log line.
    args: Arguments passed to the parent class.
    kwargs: Keyword arguments passed to the parent class.
N)super__init__r<   )selfr<   r=   r>   	__class__s   &&*,r   rB   CrawleeLogFormatter.__init__d   s     	$)&)#6 r   c                    V ^8  d   QhRRRR/# )r   recordlogging.LogRecordr   zdict[str, Any]r   )r   s   "r   r   r?   t   s      (9 n r   c                	    / pVP                   P                  4        F%  w  r4W0P                  P                   9  g   K!  WBV&   K'  	  V# )N)__dict__itemsempty_record)rC   rG   extra_fieldskeyvalues   &&   r   _get_extra_fields%CrawleeLogFormatter._get_extra_fieldst   sB    ') ////1JC++444$)S! 2 r   c                    V ^8  d   QhRRRR/# )r   rG   rH   r   strr   )r   s   "r   r   r?   |   s     +M +M. +M3 +Mr   c           	        < \          RVP                   R\        P                   R2p\        P                  VP                  R4      p\        P                  VP                  VP                  4      pV V \        P                   R2pRpV P                  V4      pV'       dC   R\        P                   R\        P                  ! VR\        R7       R\        P                   2p\        S
V `A  V4       V P#                  V4      pRp	VP$                  '       d<   R	\&        P(                  ! VP$                  P+                  4       \,        4      ,           p	MRp	V P.                  '       d   V V V V V	 2# V V V V	 2# )
a  Format the log record nicely.

This formats the log record so that it:
    - starts with the level (colorized, and padded to 5 chars so that it is nicely aligned)
    - then has the actual log message, if it's multiline then it's nicely indented
    - then has the stringified extra log fields
    - then, if an exception is a part of the log record, prints the formatted exception.
[]  (F)ensure_asciidefault)
)_LOG_NAME_COLORnamer   	RESET_ALL_LOG_LEVEL_COLORgetlevelno_LOG_LEVEL_SHORT_ALIAS	levelnamerP   r   LIGHTBLACK_EXjsondumpsrS   rA   r   formatMessageexc_texttextwrapindentrstrip_LOG_MESSAGE_INDENTr<   )rC   rG   logger_name_stringlevel_color_codelevel_short_aliaslevel_stringextra_stringextra
log_stringexception_stringrD   s   &&        r   r   CrawleeLogFormatter.format|   sm    !00&++a?PPQR ,//C266v~~vGWGWX*+,=+>u>OqQ &&v.D&&'qEWZ)[(\\]^c^m^m]no 
 	v ''/
 ???#hoofoo6L6L6NPc&dd!###(),
|L>RbQcdd
|L>:J9KLLr   )r<   )T)__name__
__module____qualname____firstlineno____doc__r   	LogRecordrL   rB   rP   r   __static_attributes____classcell__)rD   s   @r   r0   r0   T   sA     $$Wa!WdDQL7 7 +M +Mr   r0   z      )&
__future__r   rg   r   r#   rk   typingr   r   coloramar   r   r   typing_extensionsr	   crawleer
   crawlee._typesr   rf   r^   r   BLUEr   GREENr   YELLOWr   REDr   ra   rd   rn   r   r'   r8   	Formatterr0   r   r   r   <module>r      s    "   
  % : : * #'   $$ MM499LL$**OOT[[MM488dhh  MM7LL'OOWMM7	    	E SM'++ SMr   