mirror of
https://github.com/corda/corda.git
synced 2024-12-19 04:57:58 +00:00
Corrected logging location - broken by initialising logger before logging was configured.
This commit is contained in:
parent
da88a43e40
commit
e87184d1eb
@ -2,7 +2,6 @@ apply plugin: 'kotlin'
|
|||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
apply plugin: 'net.corda.plugins.publish-utils'
|
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'
|
description 'Corda node web server'
|
||||||
|
|
||||||
configurations {
|
configurations {
|
||||||
@ -20,12 +19,12 @@ sourceSets {
|
|||||||
}
|
}
|
||||||
test {
|
test {
|
||||||
resources {
|
resources {
|
||||||
srcDir "../config/test"
|
srcDir "$rootDir/config/test"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
main {
|
main {
|
||||||
resources {
|
resources {
|
||||||
srcDir "../config/dev"
|
srcDir "$rootDir/config/dev"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -56,8 +56,6 @@ data class CmdLineOptions(val baseDirectory: Path,
|
|||||||
val loggingLevel: Level,
|
val loggingLevel: Level,
|
||||||
val logToConsole: Boolean) {
|
val logToConsole: Boolean) {
|
||||||
|
|
||||||
private val log = loggerFor<CmdLineOptions>()
|
|
||||||
|
|
||||||
fun loadConfig(allowMissingConfig: Boolean = false, configOverrides: Map<String, Any?> = emptyMap()): Config {
|
fun loadConfig(allowMissingConfig: Boolean = false, configOverrides: Map<String, Any?> = emptyMap()): Config {
|
||||||
return loadConfig(baseDirectory, configFile, allowMissingConfig, configOverrides)
|
return loadConfig(baseDirectory, configFile, allowMissingConfig, configOverrides)
|
||||||
}
|
}
|
||||||
@ -77,6 +75,7 @@ data class CmdLineOptions(val baseDirectory: Path,
|
|||||||
.withFallback(appConfig)
|
.withFallback(appConfig)
|
||||||
.withFallback(defaultConfig)
|
.withFallback(defaultConfig)
|
||||||
.resolve()
|
.resolve()
|
||||||
|
val log = loggerFor<CmdLineOptions>()
|
||||||
log.info("Config:\n${finalConfig.root().render(ConfigRenderOptions.defaults())}")
|
log.info("Config:\n${finalConfig.root().render(ConfigRenderOptions.defaults())}")
|
||||||
return finalConfig
|
return finalConfig
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ fun main(args: Array<String>) {
|
|||||||
System.setProperty("consoleLogLevel", "info")
|
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")
|
val log = LoggerFactory.getLogger("Main")
|
||||||
println("Logs can be found in ${System.getProperty("log-path")}")
|
println("Logs can be found in ${System.getProperty("log-path")}")
|
||||||
|
|
||||||
|
@ -22,12 +22,12 @@ targetCompatibility = 1.6
|
|||||||
sourceSets {
|
sourceSets {
|
||||||
test {
|
test {
|
||||||
resources {
|
resources {
|
||||||
srcDir "../../../config/test"
|
srcDir "$rootDir/config/test"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
main {
|
main {
|
||||||
resources {
|
resources {
|
||||||
srcDir "../../../config/dev"
|
srcDir "$rootDir/config/dev"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user