문제

I have a log4j2.xml that performs basic webservice logging. As I want to include the webservice project as dependency within another project, I'd like to inherit the logging configuration.

<?xml version="1.0" encoding="UTF-8"?>
<Configuration>
    <Appenders>
        <RollingFile name="rolling">
            ...
        </RollingFile>
    </Appenders>

    <Loggers>
        <Root level="all">
            <AppenderRef ref="rolling />
        </Root>
    </Loggers>
</Configuration>

As I did not find a way so far to inherit this config. Is it impossible?

도움이 되었습니까?

해결책

I don't know exactly what you mean by inheriting a logging configuration, but log4j2 supports XInclude for XML configurations. I hope that is useful.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top