+
    il  c                   s|    ^ RI t ^ RIt^ RIt^ RIHtHtHtHt  ! R R]4      t ! R R]]4      t	 ! R R]]4      t
R# )	i    N)Plugin	PluginOptIndependentPlugin	CosPluginc                   s8   a  ] tR t^t o RtRtRtR tR tRt	V t
R# )LogsBasezSystem logslogsc                s(  a  R pRV.p. pS P                  V4      '       Ed   \        S P                  V4      RRR7      ;_uu_ 4       pVP                  4       p\        P
                  ! RV\        P                  \        P                  ,          R7       F  p V^,          pVP                  R4      '       dd   \        P                  ! VP                  4       ^,          P                  R4      4      ;p'       d    V\        P                  ! V4      ,          pK  K  V\        P                  ! V4      ,          pK  	  VP!                  4        FN  p
V
P                  R4      '       g   K  V\        P                  ! V
P                  4       ^,          4      ,          pKP  	  R
R
R
4       V FU  pS P                  S P                  V4      4      '       g   K+  S P                  V4      pVS P#                  RV4      ,          pKW  	  V FM  pVP                  R4      '       d
   VR,          pS P%                  V4      '       g   K<  S P'                  V4       KO  	  S P'                  . R"O4       S P)                  R4       S P+                  RRRR7       \,        ;QJ d    V 3R lR# 4       F  '       g   K   RM	  RM! V 3R lR# 4       4      pV'       d   S P/                  R4      '       dj   S P1                  RR.^dR7       S P1                  RRR7       S P1                  RRR7       S P3                  R4      '       d   S P'                  R R!.4       R
# R
# R
# R
#   \         d!   p	S P                  R	T	 24        R
p	?	EK  R
p	?	ii ; i  + '       g   i     EL; i)$/etc/rsyslog.conf/etc/syslog.confZrzUTF-8)Zencodingz-(include\((\s*)?file=([\"'`]([^'\"]*)[\"'`])))ZpatternZstringZflagszecho z $`zError parsing include(): Nz$IncludeConfigz^\S+\s+(-?\/.*$)\s+-:i   NNzjournalctl --disk-usagez/var/logTZs)Z	recursiveZ
extra_optsc              3   sf   <"   T F&  pSP                  SP                  VR 4      4      x  K(  	  R# 5i)zlog/journal/N)path_exists	path_join)Z.0Zpself   & </usr/lib/python3.14/site-packages/sos/report/plugins/logs.pyZ	<genexpr>Z!LogsBase.setup.<locals>.<genexpr>U   s1      1/! &&t~~a'HII/s   .1Fzsystemd-journaldZjournal_fullZjournal_all)tagsZpriorityZthisZjournal_since_boot)Zbootr   ZlastZjournal_last_bootall_logsz/var/log/journal/*z/run/log/journal/*)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/udevr   z/etc/rsyslog.dr   )z/varz/run)r	   Zopenr
   ZreadreZfindallZIZMZ
startswithosZgetenvZsplitZstripglobZ	ExceptionZ
_log_debugZ
splitlinesZdo_regex_find_allZpath_isfileZadd_copy_specadd_cmd_outputZadd_dir_listingZanyZ
is_serviceadd_journal
get_option)r   ZrsyslogZconfsr   ZconfZcontentZmatchZ_entZenvcZerrZlineZconfigZiZjournals   f             r   setupZLogsBase.setup   s   %#W-G$$dnnW-sWEE))+ZZL"$$+E
K$Qx  ??733')yya1F1Fu1M'NNtN %4 8  O "TYYt_4E" $..0D'7884::<?!;; 1' F. D##DNN4$899^^D)FD**+A6JJD	  A||C  bE""""1%	  	 
 	 	56Z4CH # 1/1### 1/1 1t'9::>="A&)  +&/CD&/BCz**""(($  + ;7U % K*CC5(IJJK# FEEsP   AN A!M:MN M8+N (6N M=	M8	1N 8M=	=N  N	c                s,    V P                  R RR4       R# )z/etc/rsyslog*z (ActionLibdbiPassword |pwd=)(.*)z\1[********]N)Zdo_path_regex_sub)r   s   &r   postprocZLogsBase.postprocb   s    /	
     NZsystemZhardwareZstorage)__name__
__module____qualname____firstlineno__Z
short_descplugin_nameprofilesr   r   __static_attributes____classdictcell__)__classdict__s   @r   r   r      s%     JK0HJX
 
r   r   c                   s"    ] tR t^jtRtRtRtRtR# )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.
r   r   Nr   )r   r   r   r   Z__doc__r   r    r!   r   r   r   r$   r$   j   s    	 K0Hr   r$   c                   sJ   a a ] tR t^zt o]! R^RR7      .tV 3R ltRtVtV ;t	# )CosLogslog-daysz"the number of days logs to collect)ZnameZdefaultZdescc                s   < \         SV `  4        V P                  R 4      '       d   V P                  R4       R# V P                  R^4      pV P	                  RV R2R7       R# )r   zjournalctl -o exportr&   r   days)ZsinceN)Zsuperr   r   r   r   )r   r'   	__class__r   r   r   ZCosLogs.setup   sS    ??:&& 67??:q1DQtfD>2r   r   )
r   r   r   r   r   Zoption_listr   r!   r"   Z__classcell__)r(   r#   s   @@r   r%   r%   z   s%     z1;	=K
3 3r   r%   )r   r   r   Zsos.report.pluginsr    r   r   r   r   r$   r%   r   r   r   <module>r)      sB     	 	 N NX
v X
v1h 1 1 3h	 3r   