Logback configuration to lessen the debug noise.
This commit is contained in:
parent
0370635170
commit
b6b45e7144
|
@ -159,18 +159,29 @@ class App implements Runnable {
|
|||
OptionAccessor options = cli.parse(args)
|
||||
if (options.h) cli.usage()
|
||||
|
||||
if(options.v) {
|
||||
// TODO - how to display correct version or build number ?
|
||||
println("See https://bitbucket.org/mnellemann/hmci for more information.")
|
||||
System.exit(0)
|
||||
}
|
||||
|
||||
ConfigObject configuration
|
||||
if(options.c) {
|
||||
|
||||
File configurationFile = new File((String)options.config)
|
||||
if(!configurationFile.exists()) {
|
||||
println("No configuration file found at: " + configurationFile.toString())
|
||||
println("Error - No configuration file found at: " + configurationFile.toString())
|
||||
System.exit(1)
|
||||
}
|
||||
|
||||
configuration = new ConfigSlurper("development").parse(configurationFile.toURI().toURL());
|
||||
}
|
||||
|
||||
if(configuration == null || configuration.isEmpty()) {
|
||||
println("Error - Empty or faulty configuration")
|
||||
System.exit(1)
|
||||
}
|
||||
|
||||
new App(configuration)
|
||||
System.exit(0);
|
||||
}
|
||||
|
@ -179,7 +190,7 @@ class App implements Runnable {
|
|||
@Override
|
||||
void run() {
|
||||
|
||||
log.info("run()")
|
||||
log.debug("run()")
|
||||
|
||||
boolean keepRunning = true
|
||||
int executions = 0
|
||||
|
|
|
@ -39,7 +39,7 @@ class InfluxClient {
|
|||
BatchOptions options = BatchOptions.DEFAULTS.actions(300).flushDuration(500);
|
||||
influxDB.enableBatch(options);
|
||||
|
||||
influxDB.setLogLevel(InfluxDB.LogLevel.BASIC);
|
||||
//influxDB.setLogLevel(InfluxDB.LogLevel.BASIC);
|
||||
|
||||
batchPoints = BatchPoints.database(database).precision(TimeUnit.SECONDS).build();
|
||||
|
||||
|
|
16
src/main/resources/logback.xml
Normal file
16
src/main/resources/logback.xml
Normal file
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<logger name="biz.nellemann.hmci" level="INFO"/>
|
||||
|
||||
<root level="WARN">
|
||||
<appender-ref ref="STDOUT" />
|
||||
</root>
|
||||
|
||||
</configuration>
|
Loading…
Reference in a new issue