mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 17:14:46 +00:00
syslog ui: filter new style log directories accordingly. when using suricata, there already is a directory called suricata for example with a stats.log in it. we should only try to fetch files which match the pattern:
/var/log/[app]/[component]/component_*.log /var/log/[component]/component_*.log
This commit is contained in:
parent
9e4f0dea30
commit
6dbd1d4abc
@ -64,7 +64,7 @@ if __name__ == '__main__':
|
||||
)
|
||||
if os.path.isdir(log_basename):
|
||||
# new syslog-ng local targets use an extra directory level
|
||||
for filename in sorted(glob.glob("%s/*.log" % log_basename), reverse=True):
|
||||
for filename in sorted(glob.glob("%s/%s_*.log" % (log_basename, log_basename.split('/')[-1].split('.')[0])), reverse=True):
|
||||
log_filenames.append(filename)
|
||||
# legacy log output is always stiched last
|
||||
log_filenames.append("%s.log" % log_basename)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user