
    e!h                        d Z ddlZddgZ ej                          d Zd Zej                  ddZd	 Z ed
      Z	 ed      Z
 ed      Z ed      Z ed      Z ed      Z ed      Z ed  e       D              Zy)a  
Watchers are loggers that log detailed information on
CLIPS, disabled by default and that can be enabled by
the `(watch)` method.

Here, we expose a rule, fact and agenda watchers as
well as a method to enable/disable them both individually
and all of them.

    Nwatchunwatchc                 V    t        j                  dj                  t        | f            S )N.)logging	getLoggerjoin__name__)names    X/var/www/html/diagnosisapp-backend/venv/lib/python3.12/site-packages/experta/watchers.pydefine_watcherr      s!    SXXx&6788    c                     t         j                  t               |    j                  cxk  xr t	        t         |      k  S c S )zBReturns `True` if the watcher `what` would log under `level_name`.)r   NOTSETglobalslevelgetattr)what
level_names     r   worthr      s;    NNio##,w
+, - , -r   )r   c                 ^    |st         }|D ]   }t               |   }|j                  |        " y)zq
    Enable watchers.

    Defaults to enable all watchers, accepts a list names of watchers to
    enable.

    N)ALLr   setLevel)r   r   watcher_namewatchers       r   r   r      s5       )L) r   c                  6    t        | dt        j                  i y)zr
    Disable watchers.

    Defaults to enable all watchers, accepts a list names of watchers to
    enable.

    r   N)r   r   CRITICAL)r   s    r   r   r   -   s     
4(w''(r   RULESACTIVATIONSFACTSAGENDAMATCHMATCHERENGINEc              #   N   K   | ]  }|j                         s|d k7  s|  yw)r   N)isupper).0ks     r   	<genexpr>r)   @   s     ?!AIIKAJA?s   %%%)__doc__r   __all__basicConfigr   r   DEBUGr   r   r   r   r    r!   r"   r#   r$   tupler   r    r   r   <module>r0      s   	 I
    9- }}   ) 	w]+w		!w

#		!?wy??r   