Bug 1260036

Summary: PeriodicSizeRotatingFileHandler's maxBackupIndex is not working as expected
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Swapnil Chaudhari <schaudha>
Component: DocumentationAssignee: Lucas Costi <lcosti>
Status: CLOSED CURRENTRELEASE QA Contact: Nikoleta Hlavickova <nziakova>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.4.0CC: anrobert, eap-docs, lcosti, nziakova
Target Milestone: post-GA   
Target Release: One-off release   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Build Name: 22924, Administration and Configuration Guide-6.4 Build Date: 29-05-2015 13:15:56 Topic ID: 8871-742583 [Specified]
Last Closed: 2015-10-20 06:23:48 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:
Embargoed:
Bug Depends On: 1244292    
Bug Blocks:    

Description Swapnil Chaudhari 2015-09-04 09:32:42 UTC
Title: Types of Log Handlers

Describe the issue:

As per bz-1244292, there is an issue with maxBackupIndex of PeriodicSizeRotatingFileHandler and looking at the bugzilla comment it looks like this issue will not be fixed in upcoming realeses. So it will be good if we mention this bugzilla in product documentation. 


Suggestions for improvement:


Additional information:

Periodic Size:

     Available from JBoss EAP 6.4. This is a combination of the Periodic and Size handlers and supports their combined attributes.
    Once the current log file reaches the specified size, or the specified time period has passed, the file is renamed and the handler continues to write to a newly created log file with the original name. 

There is an known issue with PeriodicSizeRotatingFileHandler the maxBackupIndex is not working as expected. This issue is captured in bu-1244292.

Comment 5 Nikoleta Hlavickova 2015-09-25 12:09:45 UTC
The new note "Note that if a file is rotated with a date format suffix, it will not be purged using the max-backup-index option." is OK.

However, the paragraph above now seems contradictory to the new note. It says that the logs rotated based on the suffix are deleted when maxBackupIndex is reached.

Suggestion:
(1) The first paragraph saying "The maximum number of rotated logs that are kept. When this number is reached, the oldest log is reused. Default: 1." is OK. I would suggest though to explicitly mention the size rotation there. Try to reformulate the "number of rotated logs" to something which suggests "logs rotated based on the file size only".

(2) Remove the paragraph above the new note:
"If the suffix attribute is used, the suffix of rotated log files is included in the rotation algorithm. When the log file is rotated, the oldest file whose name starts with name+suffix is deleted, the remaining rotated log files have their numeric suffix incremented and the newly rotated log file is given the numeric suffix 1."

(3) Keep the new note as is to make it clear that logs rotated based on the date suffix are not deleted.

Comment 8 Nikoleta Hlavickova 2015-10-09 07:48:40 UTC
Verified in revision Revision 6.4.0-40

Comment 9 Lucas Costi 2015-10-20 06:23:48 UTC
Released in EAP 6.4 docs async release.