U �����2�g(����������������������@���sN���d�dl�Z�d�dlZd�dlmZmZ�d�dlmZ�ddd�Zd dd �Zdd d�Z dS�)�����N)�dedent�indent)� getLogger��Tc�����������������C���s>���|rt�jtjd��d}tdt|���|�tjd��t�d��dS�)z�Function to print out an error message to stderr and exit. It can optionally print the stack trace as well. Args: error_msg : error message to print stack_trace : set to True to print stack trace Returns: None )�filez Exiting with nonzero status.z FATAL ERROR: ����N)� tracebackZprint_stack�sys�stderr�printr����exit)Z error_msgZstack_traceZ msg_footer��r ����C/lfs/h1/ops/prod/packages/aqm.v7.0.11/ush/python_utils/print_msg.py�print_err_msg_exit ���s ���� r���c�����������������C���s���|rt�t|����dS�dS�)aK��Function to print information message to stdout, when verbose is set to True. It does proper "dedentation" that is needed for readability of python code. Args: info_msg : info message to print verbose : set to False to silence printing Returns: True: if message is successfully printed TF)r���r���)�info_msg�verboser ���r ���r����print_info_msg���s����r���c�����������������C���s>���t�t���jjj�}|r:|r0|�tt|��d���n |�|���dS�)aa��Function to print information message using the logging module. This function should not be used if python logging has not been initialized. Args: info_msg : info message to print verbose : set to False to silence printing dedent_ : set to False to disable "dedenting" (print string as-is) Returns: None z N) r���r ���� _getframe�f_back�f_code�co_name�infor���r���)r���r���Zdedent_Zloggerr ���r ���r����log_info-���s ���� r���)r���T)T)TT) r���r ����textwrapr���r���Zloggingr���r���r���r���r ���r ���r ���r����<module>���s���