Anyone any thoughts? Actually we are thinking of migrating to log back from
log4j. So we want to try logback in one module first. We have quite a few
custom Appenders and layouts in log4j. So we want to do the migration
module by module.

But the current issue that I am getting is preventing me from using logback
in one module and log4j in other modules in the multi module maven project.

On 13-Jan-2018 9:22 AM, "Debraj Manna" <[email protected]> wrote:

> I am having a multi module maven project. In some of the modules I want to
> use log4j and in some log back. Is it possible to do so?
>
> On 13-Jan-2018 12:33 AM, "Debraj Manna" <[email protected]> wrote:
>
>> Correct restapilayer.logback.xml
>>
>> <?xml version="1.0" encoding="UTF-8"?><configuration debug="true">
>>
>>     <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
>>         <layout class="ch.qos.logback.classic.PatternLayout">
>>             <encoder>
>>                 %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - 
>> %msg%n
>>             </encoder>
>>         </layout>
>>     </appender>
>>
>>     <root level="DEBUG">
>>         <appender-ref ref="STDOUT" />
>>     </root>
>> </configuration>
>>
>>
>> Logs
>>
>> 18:58:45,418 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found 
>> resource [/home/ubuntu/build-target/restapilayer/restapilayer.logback.xml] 
>> at 
>> [file:/home/ubuntu/build-target/restapilayer/restapilayer.logback.xml]18:58:45,608
>>  |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to 
>> instantiate appender of type 
>> [ch.qos.logback.core.ConsoleAppender]18:58:45,611 |-INFO in 
>> ch.qos.logback.core.joran.action.AppenderAction - Naming appender as 
>> [CONSOLE]18:58:45,617 |-INFO in 
>> ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default 
>> type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] 
>> property18:58:45,645 |-INFO in 
>> ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT 
>> logger to DEBUG18:58:45,645 |-INFO in 
>> ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender 
>> named [CONSOLE] to Logger[ROOT]18:58:45
>>
>> ...
_______________________________________________
logback-user mailing list
[email protected]
http://mailman.qos.ch/mailman/listinfo/logback-user

Reply via email to