o
    *bJ  ã                   @   s.   d dl mZmZ d dlZG dd„ deeƒZdS )é    )ÚPluginÚIndependentPluginNc                   @   s2   e Zd ZdZdZdZefZdd„ Zefdd„ZdS )	ÚContainerLogz"All logs under /var/log/containersZcontainer_logz/var/log/containers/c                 C   s&   |   d¡r|  | j¡ d S |  ¡  d S )NZall_logs)Z
get_optionÚadd_copy_specÚlogdirÚcollect_subdirs)Úself© r	   úB/usr/lib/python3/dist-packages/sos/report/plugins/container_log.pyÚsetup   s   
zContainerLog.setupc                 C   s,   t  |¡D ]\}}}|  |  |d¡¡ qdS )z=Collect *.log files from subdirs of passed root path
        z*.logN)ÚosÚwalkr   Z	path_join)r   ÚrootZdirNameÚ_r	   r	   r
   r      s   ÿzContainerLog.collect_subdirsN)	Ú__name__Ú
__module__Ú__qualname__Z
short_descZplugin_namer   Úfilesr   r   r	   r	   r	   r
   r      s    r   )Zsos.report.pluginsr   r   r   r   r	   r	   r	   r
   Ú<module>   s   
