
=\•jš  ã               @   s  d  Z  d d l Z e j d ƒ Z y d d l m Z Wn+ e k
 rb Gd d „  d e j ƒ Z Yn Xe j e ƒ  ƒ d a d d	 d
 d d d d d d g	 Z	 e j
 ƒ  d d „ Z d d	 „  Z d d
 „  Z d d „  Z d d „  Z d d „  Z d d „  Z d d „  Z d d „  Z d S)z

é    NZ	websocket)ÚNullHandlerc               @   s   e  Z d  Z d d „  Z d S)r   c             C   s   d  S)N© )ÚselfÚrecordr   r   ú>/tmp/pip-build-jxowagp5/websocket-client/websocket/_logging.pyÚemit    s    zNullHandler.emitN)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r      s   r   FÚenableTraceÚdumpÚerrorÚwarningÚdebugÚtraceÚisEnabledForErrorÚisEnabledForDebugÚisEnabledForTracec             C   s-   |  a  |  r) t j | ƒ t j t j ƒ d S)z‹
    Turn on/off the traceability.

    Parameters
    ----------
    traceable: bool
        If set to True, traceability is enabled.
    N)Ú_traceEnabledÚ_loggerÚ
addHandlerÚsetLevelÚloggingÚDEBUG)Z	traceableÚhandlerr   r   r   r   +   s    
c             C   s9   t  r5 t j d |  d ƒ t j | ƒ t j d ƒ d  S)Nz--- z ---z-----------------------)r   r   r   )ÚtitleÚmessager   r   r   r   ;   s    c             C   s   t  j |  ƒ d  S)N)r   r   )Úmsgr   r   r   r   B   s    c             C   s   t  j |  ƒ d  S)N)r   r   )r   r   r   r   r   F   s    c             C   s   t  j |  ƒ d  S)N)r   r   )r   r   r   r   r   J   s    c             C   s   t  r t j |  ƒ d  S)N)r   r   r   )r   r   r   r   r   N   s    c               C   s   t  j t j ƒ S)N)r   ÚisEnabledForr   ÚERRORr   r   r   r   r   S   s    c               C   s   t  j t j ƒ S)N)r   r   r   r   r   r   r   r   r   W   s    c               C   s   t  S)N)r   r   r   r   r   r   [   s    )Ú__doc__r   Ú	getLoggerr   r   ÚImportErrorÚHandlerr   r   Ú__all__ÚStreamHandlerr   r   r   r   r   r   r   r   r   r   r   r   r   Ú<module>   s&   