Current File : //usr/lib64/python3.6/site-packages/borg/testsuite/__pycache__/logger.cpython-36.pyc
3

y��b'�@sjddlZddlmZddlZddlmZmZmZe�Zej�dd��Z	dd�Z
d	d
�Zdd�Zd
d�Z
dS)�N)�StringIO�)�find_parent_module�
create_logger�
setup_loggingcCs2t�}t|dd�}|jtjd��tjtj�|S)N)�streamZenv_varz%(name)s: %(message)s)rrZsetFormatter�loggingZ	Formatter�logger�setLevel�DEBUG)�ioZhandler�r
�/usr/lib64/python3.6/logger.py�	io_logger
s
rcCstjd�|j�dkst�dS)Nzhello worldz#borg.testsuite.logger: hello world
)r	�info�getvalue�AssertionError)rr
r
r�test_setup_loggings
rcCs�tjt�}|jd�|j�dks$t�tjd�}|jd�|j�dksHt�|jd�|jd�tjd�}|jd�|j�dks�t�dS)Nz
hello world 1z%borg.testsuite.logger: hello world 1
zborg.testsuite.loggerz
hello world 2zJborg.testsuite.logger: hello world 1
borg.testsuite.logger: hello world 2
rz%borg.testsuite.logger: hello world 2
)rZ	getLogger�__name__rrr�truncate�seek)rr	r
r
r�test_multiple_loggerss







rcCst�tkst�dS)N)rrrr
r
r
r�test_parent_module&srcCsxtjtj�tjd�tjd�tjd�tjd�tjd�tj	tj
d�yt�Wntk
rrtjd�YnXdS)N�debugr�warning�error�critical�	exception)
r	r
rrrrrrr�log�INFO�	Exceptionrr
r
r
r�test_lazy_logger*s




r!)rrrZpytestr	rrrZfixturerrrrr!r
r
r
r�<module>s