Current File : //proc/self/root/lib/python3/dist-packages/uaclient/cli/__pycache__/collect_logs.cpython-312.pyc |
�
��gU � �, � d dl Z d dlZd dlZd dlmZ d dlmZ d dlmZm Z m
Z
d dlmZ d dl
mZ dZ e j ee� � Zd� Z e
d ej( ej* d
eej, e eddej. �
� g�� g�� Zy)� N)�messages)�collect_logs)�ProArgument�ProArgumentGroup�
ProCommand)�HelpCategory)�replace_top_level_logger_namezpro_logs.tar.gzc �z � | j xs t }t j � 5 }t ||� t j |d� 5 }|j |d�� d d d � d d d � y# 1 sw Y �xY w# t $ r'}t j |� Y d }~d d d � yd }~ww xY w# 1 sw Y yxY w)Nzw:gzzlogs/)�arcname� r )�output�PRO_COLLECT_LOGS_FILE�tempfile�TemporaryDirectoryr �tarfile�open�add�PermissionError�LOG�error)�args�cfg�kwargs�output_file�
output_dir�results�es �;/usr/lib/python3/dist-packages/uaclient/cli/collect_logs.py�action_collect_logsr s� � ��+�+�6�!6�K� � $� $� &� �*��S�*�%� ����k�6�2�
9�g����J���8�
9��
�
9�
9��� ��I�I�a�L��� ��
���
�sF �
B1�A>�
A2�!A>�2A; �7A>�> B.�B)�B1�)B.�.B1�1B:zcollect-logsTz--outputz-o)�
short_name�help)� arguments)r! �description�preserve_description�action�
help_category�argument_groups)�loggingr r �uaclientr �uaclient.actionsr �uaclient.cli.commandsr r r �uaclient.cli.parserr �
uaclient.utilr r � getLogger�__name__r r �CLI_ROOT_COLLECT_LOGS�CLI_COLLECT_LOGS_DESC�TROUBLESHOOT�CLI_COLLECT_LOGS_OUTPUT�collect_logs_command� � r �<module>r7 s� �� � � � � )� K� K� ,� 7�)� ��g���5�h�?�@��
� "�� � '� '��.�.����+�+����#�!�9�9���
�
�� r6