~ubuntu-branches/ubuntu/precise/rsyslog/precise

« back to all changes in this revision

Viewing changes to doc/rsyslog_recording_pri.html

  • Committer: Package Import Robot
  • Author(s): Scott Moser
  • Date: 2011-11-07 13:54:56 UTC
  • mfrom: (16.1.25 sid)
  • Revision ID: package-import@ubuntu.com-20111107135456-cwt6mu19ski1h2qf
Tags: 5.8.6-1ubuntu1
* Resynchronise with Debian. Remaining changes:
  - Run as rsyslog:rsyslog, set $FileOwner to syslog
  - Replace init script with debian/rsyslog.upstart.
  - debian/rsyslog.logrotate: Use reload command to restart rsyslog
  - debian/rsyslog.conf: enable $RepeatedMsgReduction 
    to avoid bloating the syslog file (LP #453444)
  - Add debian/rsyslog.dmesg.upstart to save initial dmesg into a file.
    Install it in debian/rules.
  - debian/50-default.conf: set of default rules for syslog (forwarded to
    Debian #603160). remove file in postrm on purge. manage with ucf.
  - debian/rules: build with LDFLAGS=""
* Dropped:
  - debian/patches/02-CVE-2011-3200.patch (fixed in upstream release)

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
percent signs is literal text, which is simply written as specified.</p>
45
45
<p>Thankfully, rsyslog provides message properties for the priority. These are 
46
46
called &quot;PRI&quot;, &quot;syslogfacility&quot; and &quot;syslogpriority&quot; (case is important!). They are numerical 
47
 
values. Starting with rsyslog 1.13.4, there is also a property &quot;PRI-text&quot;, which 
48
 
contains the priority in friendly text format (e.g. &quot;syslog.info&quot;). For the rest 
 
47
values. Starting with rsyslog 1.13.4, there is also a property &quot;pri-text&quot;, which 
 
48
contains the priority in friendly text format (e.g. &quot;local0.err<133>&quot;). For the rest 
49
49
of this article, I assume that you run version 1.13.4 or higher.</p>
50
50
<p>Recording the priority is now a simple matter of adding the respective field 
51
51
to the template. It now looks like this:</p>
52
52
<p align="center">
53
 
<code>$template TraditionalFormatWithPRI,&quot;%PRI-text%: %timegenerated% %HOSTNAME% %syslogtag%%msg:::drop-last-lf%\n&quot;</code>
 
53
<code>$template TraditionalFormatWithPRI,&quot;%pri-text%: %timegenerated% %HOSTNAME% %syslogtag%%msg:::drop-last-lf%\n&quot;</code>
54
54
</p>
55
55
<p>Now we have the right template - but how to write it to a file? You probably 
56
56
have a line like this in your syslog.conf:</p>