I have placed my logback.xml outside the war and have included that file in the main logback.xml.
The problem is absolute path is working with include file but relative path is not working Below is the code :
<configuration scan="true" scanPeriod="30 seconds">
<include file="..//..//..//..//logback-new.xml" />
</configuration>
included file path : C:\Users\MB0000038\Documents\vuliv-server-development - 2\theapp\logback files
resources folder inside war : C:\Users\MB0000038\Documents\vuliv-server-development - 2\theapp\AnalyticsAPI\src\main\resources
Any help appreciated
According to the Logback docs the file inclusion ...
can use relative paths but note that the current directory is defined by the application and is not necessarily related to the path of the configuration file.
So, given your relative path: ..//..//..//..//logback-new.xml
Logback will look for that logback-new.xml
four directories above the application's current working directory.
I suspect you are defining the relative path as if should be relative to the resources folder inside your WAR but this is not how it should be defined. Instead, it should be defined relative to the application's current working directory. If Logback cannot find the file to be included it will emit a status message telling you that.