You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@logging.apache.org by Marco Herrn <ml...@mherrn.de> on 2018/10/24 08:01:48 UTC

Pull Request for [LOG4J2-2403] Allow zero padding the counter of a RollingFileAppender

Hi,

I just realized that I accidently posted my original message to the user
mailing list instead of the dev mailing list.

So here I just announce the Pull Request I made and only reference my
original mail below.


Best regards
Marco

-----------------------

Well,

I have now split those tests into two separate Test classes.
I have prepared a pull request for it. It would be great if someone reviews
it and include it in the next release of Log4j2.

JIRA Ticket:  https://issues.apache.org/jira/browse/LOG4J2-2403
Pull Request: https://github.com/apache/logging-log4j2/pull/224

Best regards
Marco

On Tue, Oct 23, 2018 at 04:01:50PM +0200, Marco Herrn wrote:
> Hi,
> 
> I am preparing a pull request for LOG4J2-2403 and modified an existing
> Unit-Test that has its configuration in YAML format. I added a second
> ListAppender, but this causes the Unit test to behave strangely.
> 
> It seems that, since I have two ListAppenders now, the sequence numbers are
> shared between the Appenders. So one of them gets the sequence number 1, 3,
> 5, 7, 9 and the other gets 2, 4, 6, 8, 10. Is there a way to avoid this?
> 
> The seconds problem is that the sequence number is not reset between the
> tests. I do not know how to do this with the LoggerContextRule.
> 
> 
> The Unit-Test I have modified is SequenceNumberPatternConverterTest.
> Please find attached the modified Test class and its corresponding YAML-File.
> 
> Any suggestions on how to solve these problems? I could create a seconds
> Unit test class, but I would rather use the same because they actually test
> exactly the same functionality, only with different patterns.
> 
> 
> Best regards
> Marco
> 


> Configuration:
>   status: OFF
>   name: SequenceNumberPatternConverterTest
> 
>   Appenders:
>     List:
>       - name: List
>         PatternLayout:
>           pattern: '%sn'
> 
>       - name: Padded
>         PatternLayout:
>           pattern: '%03sn'
> 
>   Loggers:
>     Root:
>       level: INFO
>       AppenderRef:
>         - ref: List
>         - ref: Padded
> 

> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org


----- End forwarded message -----

Re: Pull Request for [LOG4J2-2403] Allow zero padding the counter of a RollingFileAppender

Posted by ml...@mherrn.de.
*bump*

I created a Pull Request for LOG4J2-2403:
Ralph and Remko, both of you have commented on the Stackoverflow question
about that issue, Ralph you even requested a patch for it in the JIRA
ticket.
And yet, no one has even commented on that pull request.

Would someone please consider reviewing the PR and hopefully integrate it?

Stackoverflow Question: https://stackoverflow.com/q/35073491/572645
JIRA Ticket:  https://issues.apache.org/jira/browse/LOG4J2-2403
Pull Request: https://github.com/apache/logging-log4j2/pull/224


Best regards
Marco



Pull Request for [LOG4J2-2403] Allow zero padding the counter of a RollingFileAppender

Posted by ml...@mherrn.de.
I created a Pull Request for LOG4J2-2403 some time ago.

That PR fixes the described problem of LOG4J2-2403 and in the below
mentioned Stackoverflow Question.

Ralph and Remko, both of you have commented on the Stackoverflow question
about that issue, Ralph you even requested a patch for it in the JIRA
ticket.
And yet, no one has even commented on that pull request.

Would someone please consider reviewing the PR and hopefully integrate it?

Stackoverflow Question: https://stackoverflow.com/q/35073491/572645
JIRA Ticket:  https://issues.apache.org/jira/browse/LOG4J2-2403
Pull Request: https://github.com/apache/logging-log4j2/pull/224


Best regards
Marco