diff --git a/webserver/build.gradle b/webserver/build.gradle index cff13753bd..c5fb1778c2 100644 --- a/webserver/build.gradle +++ b/webserver/build.gradle @@ -2,7 +2,6 @@ apply plugin: 'kotlin' apply plugin: 'java' apply plugin: 'net.corda.plugins.publish-utils' -// TODO: Break dependency on node and move to another location such as a submodule of client. description 'Corda node web server' configurations { @@ -20,12 +19,12 @@ sourceSets { } test { resources { - srcDir "../config/test" + srcDir "$rootDir/config/test" } } main { resources { - srcDir "../config/dev" + srcDir "$rootDir/config/dev" } } } diff --git a/webserver/src/main/kotlin/net/corda/webserver/WebArgsParser.kt b/webserver/src/main/kotlin/net/corda/webserver/WebArgsParser.kt index 3f1b1c48c7..3f8e2377dc 100644 --- a/webserver/src/main/kotlin/net/corda/webserver/WebArgsParser.kt +++ b/webserver/src/main/kotlin/net/corda/webserver/WebArgsParser.kt @@ -56,8 +56,6 @@ data class CmdLineOptions(val baseDirectory: Path, val loggingLevel: Level, val logToConsole: Boolean) { - private val log = loggerFor() - fun loadConfig(allowMissingConfig: Boolean = false, configOverrides: Map = emptyMap()): Config { return loadConfig(baseDirectory, configFile, allowMissingConfig, configOverrides) } @@ -77,6 +75,7 @@ data class CmdLineOptions(val baseDirectory: Path, .withFallback(appConfig) .withFallback(defaultConfig) .resolve() + val log = loggerFor() log.info("Config:\n${finalConfig.root().render(ConfigRenderOptions.defaults())}") return finalConfig } diff --git a/webserver/src/main/kotlin/net/corda/webserver/WebServer.kt b/webserver/src/main/kotlin/net/corda/webserver/WebServer.kt index 45dbbf1991..4f7a072466 100644 --- a/webserver/src/main/kotlin/net/corda/webserver/WebServer.kt +++ b/webserver/src/main/kotlin/net/corda/webserver/WebServer.kt @@ -34,7 +34,7 @@ fun main(args: Array) { System.setProperty("consoleLogLevel", "info") } - System.setProperty("log-path", (cmdlineOptions.baseDirectory / "web/logs").toString()) + System.setProperty("log-path", (cmdlineOptions.baseDirectory / "logs/web").toString()) val log = LoggerFactory.getLogger("Main") println("Logs can be found in ${System.getProperty("log-path")}") diff --git a/webserver/webcapsule/build.gradle b/webserver/webcapsule/build.gradle index 45180403d4..e4dc6e85db 100644 --- a/webserver/webcapsule/build.gradle +++ b/webserver/webcapsule/build.gradle @@ -22,12 +22,12 @@ targetCompatibility = 1.6 sourceSets { test { resources { - srcDir "../../../config/test" + srcDir "$rootDir/config/test" } } main { resources { - srcDir "../../../config/dev" + srcDir "$rootDir/config/dev" } } }