�
�!f� � �~ � d Z ddlZddlZddlZddlZdd�Zdedej dej fd�Z d� Z
d � Zd
� Zy)zLegacy logging functions.� Nc � � |r5t j j t j d� � d�� t | � y)z?Log the given string to stdout. Prepend timestamp if requested.z%x %Xz: N)�sys�stdout�write�time�strftime�print)�message� timestamps �0/usr/lib/python3/dist-packages/apport/logging.py�logr
s/ � ���
�
���D�M�M�'�2�3�2�6�7� �'�N� �msg�args�returnc �F � t | g|��� t j d� y)z0Print out an error message and exit the program.� N)�errorr �exit�r r s r �fatalr s � � �#�����H�H�Q�Kr c �� � t j rat j j d� t j j | |z � t j j d� yy)zPrint out an error message.zERROR: �
N�r �stderrr r s r r r sH � �
�z�z��
�
����#��
�
����t��$��
�
����� r c �� � t j rat j j d� t j j | |z � t j j d� yy)zPrint out an warning message.z WARNING: r Nr r s r �warningr sH � �
�z�z��
�
����%��
�
����t��$��
�
����� r c � � dt j vst j syi }t dd�� 5 }|D ]< |