Bug 1008806

Summary: No any log generated after changing periodic-rotating-file-handler to size-rotating-file-handler
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: xiaohui Wu <xiwu>
Component: LoggingAssignee: James Perkins <jperkins>
Status: CLOSED CURRENTRELEASE QA Contact: Nikoleta Hlavickova <nziakova>
Severity: medium Docs Contact: Russell Dickenson <rdickens>
Priority: unspecified    
Version: 6.1.1CC: jcacek, olukas, pkremens, xiwu
Target Milestone: ER3   
Target Release: EAP 6.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-15 16:20:35 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 xiaohui Wu 2013-09-17 06:36:33 UTC
There is no any log in the server.log after changing periodic-rotating-file-handler to size-rotating-file-handler.
The reproduce steps:
1. remove the part periodic-rotating-file-handler in standalone.xml
            <periodic-rotating-file-handler name="FILE">
                <formatter>
                    <pattern-formatter pattern="%d{HH:mm:ss.SSS} %-5p [%c] (%t) %s%E%n"/>
                </formatter>
                <file relative-to="jboss.server.log.dir" path="server.log"/>
                <suffix value=".yyyy-MM-dd"/>
                <append value="true"/>
            </periodic-rotating-file-handler>
2. add one size-rotating-file-handler
            <size-rotating-file-handler name="FILE" autoflush="true">
                <formatter>
                    <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p (%c) [%t] %s%E%n"/>
                </formatter>
                <file relative-to="jboss.server.log.dir" path="server.log"/>
                <rotate-size value="500k"/>
                <max-backup-index value="15"/>
                <append value="true"/>
            </size-rotating-file-handler>
3. start the jboss server, then you will see there is a warning in the server.log and no any further logs in the server.log.

13:23:28,205 WARN  [org.jboss.as.logging] (Controller Boot Thread) JBAS011511: Replacing handler 'FILE' during add operation. Either the handler type or the module name differs from the initial configuration.

The possible fix: 

https://issues.jboss.org/browse/WFLY-178 the code change is in https://github.com/wildfly/wildfly/pull/4137 
and the bugzilla is in EAP6.1.0: 
https://bugzilla.redhat.com/show_bug.cgi?id=918103

But this issue still exists in 6.1.1

Best Regards,
Vicky

Comment 1 xiaohui Wu 2013-09-17 07:12:19 UTC
https://issues.jboss.org/browse/WFLY-2093

Comment 2 JBoss JIRA Server 2013-09-19 06:51:45 UTC
James Livingston <jlivings> made a comment on jira WFLY-2093

No, with the WildFly nightly it emits the warning (which is correct, since the boot logging and normal logging have different configuration) but the logging continues as expected.

Comment 3 JBoss JIRA Server 2013-09-19 08:22:02 UTC
jaikiran pai <jpai> made a comment on jira WFLY-2093

Thanks James L.

I think this JIRA can be closed then since the issue isn't present in WildFly. I'll however let James P decide that.

Comment 5 JBoss JIRA Server 2013-09-19 20:48:05 UTC
James Perkins <jperkins> updated the status of jira WFLY-2093 to Resolved

Comment 6 JBoss JIRA Server 2013-09-19 20:48:05 UTC
James Perkins <jperkins> made a comment on jira WFLY-2093

Marking as duplicate for [WFLY-1587]

Comment 8 Ondrej Lukas 2013-10-07 11:12:25 UTC
I tried to reproduce it according your steps, but it always works fine for me. It logs WARN message but it writes another logs which looks right as usual. Is there any other needed configuration please? I can't verify it for that reason.

Comment 11 xiaohui Wu 2013-10-09 04:48:22 UTC
To Ondrej Lukas:
There are no other more steps, but you need a fresh EAP6.1.1 or EAP6.1.0.

(In reply to Ondrej Lukas from comment #8)
> I tried to reproduce it according your steps, but it always works fine for
> me. It logs WARN message but it writes another logs which looks right as
> usual. Is there any other needed configuration please? I can't verify it for
> that reason.

Comment 12 Ondrej Lukas 2013-10-09 05:29:01 UTC
Thanks for reply, but I still can't reproduce it. However PR was merged to JBoss EAP and in EAP 6.2.0.ER4 it has expected behavior. Could you take a look on that please and are you ok with I verified it?

Comment 15 xiaohui Wu 2013-10-14 07:29:10 UTC
These lines are generated by logging system automatically after modified the handler from size-rotating-file-handler to periodic-rotating-file-handler or vice versa. I  modified these handlers several times from one to another. But did not touch the logging.properties file.

Comment 16 Josef Cacek 2013-10-14 11:21:17 UTC
Verified in 6.2.0.ER5.