Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 951727 - Untill ver 6.2.0 of rsyslog, the %pri-text% property includes the numeric string
Untill ver 6.2.0 of rsyslog, the %pri-text% property includes the numeric string
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: rsyslog (Show other bugs)
6.4
Unspecified Linux
unspecified Severity medium
: rc
: ---
Assigned To: Tomas Heinrich
Dalibor Pospíšil
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-12 17:48 EDT by Steve
Modified: 2013-11-21 18:40 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
local0.info<164> Cause: Numerical value of the PRI property was appended to the "pri-text" variable. Consequence: The resulting value look like this: "local0.info<164>". Fix: The "<N>" suffix was removed. Result: Now, the variable only contains textual facility and severity values.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-21 18:40:35 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1716 normal SHIPPED_LIVE rsyslog bug fix update 2013-11-20 16:51:43 EST

  None (edit)
Description Steve 2013-04-12 17:48:59 EDT
Description of problem:
The released ver of rsyslog (5.8.10-6.el6.x86_64) has a bug where the %pri-text% template property returns the numeric code as part of the string.  This was fixed in ver 6.2.0 (http://www.rsyslog.com/doc/v6compatibility.html) 

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. in rsyslog.conf create a template with %pri-text%
$template pri-test,"%pri%: %pri-test%\n"
2. use template
*.info  /var/log/pritest;pri-test
3.look at log file and notice the second field
164: local0.info<164>
  
Actual results:

The pri numeric code is appended to the end of the %pri-text% property field
Expected results:
No numeric code

Additional info:

The rsyslog team posted the following concerning this "bug": http://www.rsyslog.com/doc/v6compatibility.html

Property "pri-text"

Traditionally, this property did not only return the textual form of the pri ("local0.err"), but also appended the numerical value to it ("local0.err<133>"). This sounds odd and was left unnoticed for some years. In October 2011, this odd behaviour was brought up on the rsyslog mailing list by Gregory K. Ruiz-Ade. Code review showed that the behaviour was intentional, but no trace of what the intention was when it was introduced could be found. The documentation was also unclear, it said no numerical value was present, but the samples had it. We agreed that the additional numerical value is of disadvantage. We also guessed that this property is very rarely being used, otherwise the problem should have been raised much earlier. However, we didn't want to change behaviour in older builds. So v6 was set to clean up the situation. In v6, text-pri will always return the textual part only ("local0.err") and the numerical value will not be contained any longer inside the string. If you actually need that value, it can fairly easily be added via the template system.
Comment 9 errata-xmlrpc 2013-11-21 18:40:35 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-1716.html

Note You need to log in before you can comment on or make changes to this bug.