Make blobinspector not log to console by default (#4059)

This commit is contained in:
Anthony Keenan 2018-10-11 18:01:54 +02:00 committed by GitHub
parent 825c544cac
commit e3685f5e81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 10 deletions

View File

@ -52,14 +52,6 @@ class BlobInspector : CordaCliWrapper("blob-inspector", "Convert AMQP serialised
override fun runProgram() = run(System.out) override fun runProgram() = run(System.out)
override fun initLogging() {
if (verbose) {
loggingLevel = Level.TRACE
}
val loggingLevel = loggingLevel.name.toLowerCase(Locale.ENGLISH)
System.setProperty("logLevel", loggingLevel) // This property is referenced from the XML config file.
}
fun run(out: PrintStream): Int { fun run(out: PrintStream): Int {
val inputBytes = source!!.readBytes() val inputBytes = source!!.readBytes()
val bytes = parseToBinaryRelaxed(inputFormatType, inputBytes) val bytes = parseToBinaryRelaxed(inputFormatType, inputBytes)

View File

@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Configuration status="info"> <Configuration status="info">
<Properties> <Properties>
<Property name="logLevel">off</Property> <Property name="consoleLogLevel">${sys:consoleLogLevel:-error}</Property>
<Property name="defaultLogLevel">${sys:defaultLogLevel:-info}</Property>
</Properties> </Properties>
<Appenders> <Appenders>
<Console name="STDOUT" target="SYSTEM_OUT" ignoreExceptions="false"> <Console name="STDOUT" target="SYSTEM_OUT" ignoreExceptions="false">
@ -9,7 +10,7 @@
</Console> </Console>
</Appenders> </Appenders>
<Loggers> <Loggers>
<Root level="${sys:logLevel}"> <Root level="${sys:consoleLogLevel}">
<AppenderRef ref="STDOUT"/> <AppenderRef ref="STDOUT"/>
</Root> </Root>
</Loggers> </Loggers>