[ 
https://issues.apache.org/jira/browse/ISIS-1979?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16608090#comment-16608090
 ] 

ASF subversion and git services commented on ISIS-1979:
-------------------------------------------------------

Commit 53332a2e64ba7e91da45f9a2eda8a85da02853c9 in isis's branch 
refs/heads/master from [~gabriel.terwesten]
[ https://gitbox.apache.org/repos/asf?p=isis.git;h=53332a2 ]

ISIS-1979: Refactor logging in headless runtime and prevent configuring log4j 
twice

thout these changes, IsisSystem is setting up log4j which is too late since 
other classes which
bootstrap Isis require logging to work. Currently, 
HeadlessWithBootstrappingAbstract configures log4j in
addition to IsisSystem. IsisSystem sets up logging either through 
logging.properties or a fallback. But
logging.properties does not always exist (integration tests). Without 
logging.properties the fallback
adds a console appender to the root logger in addition to any configuration in 
logging-integtest.properties,
resulting in duplicated logs in integration tests.

This commit removes any logging setup from IsisSystem. 
HeadlessWithBootstrappingAbstract now uses the
IsisLoggingConfigurer which is normally used to set up logging. This requires 
IsisLoggingConfigurer to
be flexible as to the basename of the configuration file.

Also, some code duplication is refactored into LeveledLogger.


> Integration test logging includes a lot of log events twice.
> ------------------------------------------------------------
>
>                 Key: ISIS-1979
>                 URL: https://issues.apache.org/jira/browse/ISIS-1979
>             Project: Isis
>          Issue Type: Bug
>          Components: Archetype: SimpleApp
>    Affects Versions: 2.0.0-M1
>            Reporter: Andi Huber
>            Assignee: Andi Huber
>            Priority: Major
>             Fix For: 2.0.0-M2
>
>
> As reported by Gabriel Terwesten <[email protected]> [1]
> During the bootstrapping of Isis for the integration test there seem to be 
> two appenders. The lines starting with the current time come from the 
> appender configured in `logging-integtest.properties`. I was not able to 
> understand where the second appender is configured. This is not a big problem 
> just a bit distracting.
> [1] 
> https://lists.apache.org/thread.html/cd92d8cd28ae877104fc965f83ca90b98e2e8188f464b65181e79a27@%3Cusers.isis.apache.org%3E



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to