Univention Bugzilla – Attachment 7812 Details for
Bug 41816
Extend rsyslog logrotate template to allow a configuration per logfile
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Compatible extended rsyslog logrotate template
rsyslog (text/plain), 1.83 KB, created by
Ingo Sieverdingbeck
on 2016-07-18 15:02:00 CEST
(
hide
)
Description:
Compatible extended rsyslog logrotate template
Filename:
MIME Type:
Creator:
Ingo Sieverdingbeck
Created:
2016-07-18 15:02:00 CEST
Size:
1.83 KB
patch
obsolete
>@%@UCRWARNING=# @%@ > >/var/log/syslog >{ >@!@ >import univention.lib.ucrLogrotate >settings = univention.lib.ucrLogrotate.getLogrotateConfig('syslog', configRegistry) >for setting in settings.values(): > print '\t%s' % (setting, ) >print '\tdelaycompress' >print '\tpostrotate' >print '\t\tinvoke-rc.d rsyslog reload > /dev/null' >print '\tendscript' >print '}' > >print '' > >other_settings = univention.lib.ucrLogrotate.getLogrotateConfig('syslog-other', configRegistry) >logtypes=['mail', 'daemon', 'kern', 'auth', 'user', 'lpr', 'cron', 'debug', 'messages', 'news'] >other_logfiles=[] > >for logtype in logtypes: > logfiles=[] > log_settings = univention.lib.ucrLogrotate.getLogrotateConfig(logtype, configRegistry) > if logtype == 'news': > logfiles.append('/var/log/news.crit') > logfiles.append('/var/log/news.err') > logfiles.append('/var/log/news.notice') > elif logtype == 'mail': > logfiles.append('/var/log/mail.err') > logfiles.append('/var/log/mail.warn') > logfiles.append('/var/log/mail.info') > logfiles.append('/var/log/mail.log') > elif logtype == 'debug' or logtype == 'messages': > logfiles.append('/var/log/%s' % logtype) > else: > logfiles.append('/var/log/%s.log' % logtype) > > if other_settings == log_settings: > other_logfiles.extend(logfiles) > else: > for logfile in logfiles: > print logfile > print '{' > for setting in log_settings.values(): > print '\t%s' % (setting, ) > print '\tdelaycompress' > print '\tsharedscripts' > print '\tpostrotate' > print '\t\tinvoke-rc.d rsyslog reload > /dev/null' > print '\tendscript' > print '}' > > >for logfile in other_logfiles: > print logfile >print '{' >for setting in other_settings.values(): > print '\t%s' % (setting, ) >print '\tdelaycompress' >print '\tsharedscripts' >print '\tpostrotate' >print '\t\tinvoke-rc.d rsyslog reload > /dev/null' >print '\tendscript' >print '}' >@!@
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 41816
: 7812