When I test my application in local (without wildfly) it works. I can go to logback.xml, change some appender and then I can see the changes on lilith.
When I deploy my application on wildfly it doesn't work. This is the logback.xml file:
<configuration debug="true" scan="true" scanPeriod="10 seconds">
<appender name="lilith-commty" class="ch.qos.logback.classic.net.SocketAppender">
<RemoteHost>192.168.56.1</RemoteHost>
<Port>4560</Port>
<ReconnectionDelay>170</ReconnectionDelay>
<IncludeCallerData>true</IncludeCallerData>
</appender>
<root level="trace">
<appender-ref ref="lilith-commty"/>
</root>
<logger name="org.mongodb" additivity="false"> </logger>
<logger name="io.swagger" additivity="false"> </logger>
<logger name="org.reflections" additivity="false"> </logger>
<logger name="ma.glasnost" additivity="false"> </logger>
In server.log from wildfly I've seen these messages:
2017-05-08 08:50:58,929 INFO [stdout] (ServerService Thread Pool -- 100) 08:50:58,866 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [vfs:/content/commty.war/WEB-INF/classes/logback.xml]
2017-05-08 08:50:58,931 INFO [stdout] (ServerService Thread Pool -- 100) 08:50:58,931 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Will scan for changes in [vfs:/content/commty.war/WEB-INF/classes/logback.xml]
2017-05-08 08:50:58,931 INFO [stdout] (ServerService Thread Pool -- 100) 08:50:58,931 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Setting ReconfigureOnChangeTask scanning period to 10 seconds
But then logback shows me that message on the server.log:
2017-05-08 08:51:02,021 INFO [stdout] (logback-5) 08:51:02,021 |-INFO in ReconfigureOnChangeTask(born:1494228032019) - Empty watch file list. Disabling
It seems that logback isn't finding the logback.xml so it can't see the changes.
How I can fix that?
Thanks.
EDIT: It seems that the main problem is that logback doesn't know how to solve the url to the logback.xml for reloading it because vfs:
ch.qos.logback.core.joran.spi.ConfigurationWatchList@50d2b290 - URL [vfs:/content/commty.war/WEB-INF/classes/logback.xml] is not of type file
Any idea?