HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/sos/report/plugins/__pycache__/logs.cpython-310.pyc
o

C��g��@sXddlZddlmZmZmZmZGdd�de�ZGdd�dee�ZGdd�dee�ZdS)	�N)�Plugin�	PluginOpt�IndependentPlugin�	CosPluginc@s(eZdZdZdZdZdd�Zdd�ZdS)	�LogsBasezSystem logs�logs��system�hardware�storagec	s�d}d|g}g}��|�r>t��|�ddd��}|��D]}|�d�r.|t�|��d�7}qWd�n1s9wY|D]}����|��sKq@��|�}|��d|�7}q@|D]}|�d	�rh|dd�}��|�rr��	|�q[��	gd
����
d��jdd
d�t�fdd�dD��}|r���
d�r��jddgdd��jddd��jddd���d�r���	ddg�dSdSdSdS)Nzetc/rsyslog.conf�/etc/syslog.conf�rzUTF-8)�encodingz$IncludeConfig�z^\S+\s+(-?\/.*$)\s+�-)z/var/log/auth.log*z/var/log/boot.logz/var/log/dist-upgradez/var/log/installerz/var/log/kern.log*z/var/log/messages*z/var/log/secure*z/var/log/syslog*z
/var/log/udevz/etc/rsyslog.confz/etc/rsyslog.drzjournalctl --disk-usagez/var/logT)�	recursivec3s"�|]}����|d��VqdS)zlog/journal/N)�path_exists�	path_join)�.0�p��self��9/usr/lib/python3/dist-packages/sos/report/plugins/logs.py�	<genexpr>As��z!LogsBase.setup.<locals>.<genexpr>)z/varz/runzsystemd-journald�journal_full�journal_all�d)�tags�priority�this�journal_since_boot)�bootr�last�journal_last_boot�all_logsz/var/log/journal/*z/run/log/journal/*)r�openr�	readlines�
startswith�glob�split�do_regex_find_all�path_isfile�
add_copy_spec�add_cmd_output�add_dir_listing�any�
is_service�add_journal�
get_option)	r�rsyslog�confsr�conf�line�config�i�journalrrr�setupsR

���



�
�
�

��zLogsBase.setupcCs|�ddd�dS)Nz
/etc/rsyslog*z (ActionLibdbiPassword |pwd=)(.*)z\1[********])�do_path_regex_subrrrr�postprocNs
�zLogsBase.postprocN)�__name__�
__module__�__qualname__�
short_desc�plugin_name�profilesr;r=rrrrr
s:rc@seZdZdZdZdZdS)�IndependentLogsa�
    This plugin will collect logs traditionally considered to be "system" logs,
    meaning those such as /var/log/messages, rsyslog, and journals that are
    not limited to unit-specific entries.

    Note that the --since option will apply to journal collections by this
    plugin as well as the typical application to log files. Most users can
    expect typical journal collections to include the "full" journal, as well
    as journals limited to this boot and the previous boot.
    rrN)r>r?r@�__doc__rBrCrrrrrDVsrDcs,eZdZedddd�gZ�fdd�Z�ZS)�CosLogs�log-days�z"the number of days logs to collect)�name�default�desccsFt���|�d�r|�d�dS|�dd�}|jd|�d�d�dS)Nr%zjournalctl -o exportrGrHr�days)�since)�superr;r3r.r2)rrL��	__class__rrr;ls


z
CosLogs.setup)r>r?r@r�option_listr;�
__classcell__rrrOrrFfs��rF)	r)�sos.report.pluginsrrrrrrDrFrrrr�<module>s
I