Details
Description
When configuring Logback to autoscan (watch) changes in logback.xml config file, it prints that URL pointing to file is not a file - see server.log ("URL [vfs:/content/maven-showcase.war/WEB-INF/classes/logback.xml] is not of type file")
ReconfigureOnChangeFilter prints "Will scan for changes in [[]] every 1 seconds." It do not see the file, because URL uses vfs: prefix (not file:) as it's Wildfly (jboss) virtual file system.
I've created this part of code that can convert VFS files (URLs) to real file system path (URLs)):
final ConfigurationWatchList configurationWatchList = ConfigurationWatchListUtil.getConfigurationWatchList(loggerContext);
final URL mailURL = configurationWatchList.getMainURL();
final URLConnection conn = mailURL.openConnection();
final VirtualFile vf = (VirtualFile) conn.getContent();
VFSUtils.getPhysicalURL(vf)
It uses jboss maven dependecy:
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-vfs</artifactId>
<version>3.2.6.Final</version>
</dependency>
If I can help anyhow (programming included) let me know.
Tomas
Attachments
Issue Links
- relates to (out)
-
LOGBACK-1309 No autoscaning for logback.xml when using http-URI for config file
- Open