HEX
Server: Apache
System: Linux infong-uk86 4.4.400-icpu-106 #2 SMP Mon Sep 15 08:23:40 UTC 2025 x86_64
User: u44115835 (4976590)
PHP: 8.4.17
Disabled: NONE
Upload Files
File: //kunden/lib/python3/dist-packages/dulwich/__pycache__/log_utils.cpython-39.pyc
a

�~�_
�@sXdZddlZddlZejZGdd�dej�Ze�Zed�Ze�e�dd�Z	dd	�Z
dS)
a�Logging utilities for Dulwich.

Any module that uses logging needs to do compile-time initialization to set up
the logging environment. Since Dulwich is also used as a library, clients may
not want to see any logging output. In that case, we need to use a special
handler to suppress spurious warnings like "No handlers could be found for
logger dulwich.foo".

For details on the _NullHandler approach, see:
http://docs.python.org/library/logging.html#configuring-logging-for-a-library

For many modules, the only function from the logging module they need is
getLogger; this module exports that function for convenience. If a calling
module needs something else, it can import the standard logging module
directly.
�Nc@seZdZdZdd�ZdS)�_NullHandlerz;No-op logging handler to avoid unexpected logging warnings.cCsdS)N�)�self�recordrr�3/usr/lib/python3/dist-packages/dulwich/log_utils.py�emit/sz_NullHandler.emitN)�__name__�
__module__�__qualname__�__doc__rrrrrr,srZdulwichcCst�tjtjtjdd�dS)z#Set up the default Dulwich loggers.z&%(asctime)s %(levelname)s: %(message)s)�level�stream�formatN)�remove_null_handler�loggingZbasicConfig�INFO�sys�stderrrrrr�default_logging_config8s�rcCst�t�dS)z�Remove the null handler from the Dulwich loggers.

    If a caller wants to set up logging using something other than
    default_logging_config, calling this function first is a minor optimization
    to avoid the overhead of using the _NullHandler.
    N)�_DULWICH_LOGGERZ
removeHandler�
_NULL_HANDLERrrrrr?sr)rrrZ	getLoggerZHandlerrrrZ
addHandlerrrrrrr�<module>s