Bug 1368567

Summary: [RFE]: Include "year" in rsyslog default timestamp format
Product: Red Hat Enterprise Linux 7 Reporter: Sham Antony <santony>
Component: rsyslogAssignee: Radovan Sroka <rsroka>
Status: CLOSED NOTABUG QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: low Docs Contact:
Priority: low    
Version: 7.1CC: cww, dapospis, mgrepl, mhaicman, pvrabec, rsroka
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-14 08:40:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Sham Antony 2016-08-19 18:54:47 UTC
1. Proposed title of this feature request  

Include "year" in rsyslog default timestamp format.
 
2. Who is the customer behind the request?  

Account: UCL  accountnumber 1498818 
  
TAM customer: no
SRM customer: no  
Strategic: no 
  
3. What is the nature and description of the request?  

Include "year" in rsyslog default timestamp format, also like to get one of following format,

YYY MONTH 04 HH:MM:SS 

Or

YYYY-MM-DD HH:MM:SS
  
4. Why does the customer need this? (List the business requirements here) 

Not having the year defined in the datestamp makes processing of logs awkward then trying to process log files going back several years. One needs to rely on the datestamp of the file to guess the year. This seems like an obvious exclusion to customer. 
  
5. How would the customer like to achieve this? (List the functional requirements here)  

Expect following timestamp format in rsyslog,

yyyy Jan dd HH:MM:SS 

Or

yyyy-mm-dd HH:MM:SS
  
6. For each functional requirement listed, specify how Red Hat and the customer can test to confirm the requirement is successfully implemented.  

Yes
  
7. Is there already an existing RFE upstream or in Red Hat Bugzilla?  

No
  
8. Does the customer have any specific timeline dependencies and which release would they like to target (i.e. RHEL5, RHEL6)?  

RHEL 6 and RHEL 7
  
9. Is the sales team involved in this request and do they have any additional input?

No  
  
10. List any affected packages or components.  

rsyslog

Comment 2 Tomas Heinrich 2016-09-02 14:21:04 UTC
(In reply to Sham Antony from comment #0)
> 1. Proposed title of this feature request  
> 
> Include "year" in rsyslog default timestamp format.

The default is unlikely to change.

You can turn on expanded timestamps by just commenting out this line from the default configuration:
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat

Comment 9 Dalibor Pospíšil 2016-12-14 08:40:30 UTC
Closing this bug, as we do not want to change default behavior and the customer case is also closed with following configuration snippet advice:

$template MyCustomFmt,"%$Year% %timegenerated% %HOSTNAME% %syslogtag%%msg:::drop-last-lf%\n" $ActionFileDefaultTemplate MyCustomFmt