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)
|
OptionAccessor options = cli.parse(args)
|
||||||
if (options.h) cli.usage()
|
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
|
ConfigObject configuration
|
||||||
if(options.c) {
|
if(options.c) {
|
||||||
|
|
||||||
File configurationFile = new File((String)options.config)
|
File configurationFile = new File((String)options.config)
|
||||||
if(!configurationFile.exists()) {
|
if(!configurationFile.exists()) {
|
||||||
println("No configuration file found at: " + configurationFile.toString())
|
println("Error - No configuration file found at: " + configurationFile.toString())
|
||||||
System.exit(1)
|
System.exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
configuration = new ConfigSlurper("development").parse(configurationFile.toURI().toURL());
|
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)
|
new App(configuration)
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
}
|
}
|
||||||
|
@ -179,7 +190,7 @@ class App implements Runnable {
|
||||||
@Override
|
@Override
|
||||||
void run() {
|
void run() {
|
||||||
|
|
||||||
log.info("run()")
|
log.debug("run()")
|
||||||
|
|
||||||
boolean keepRunning = true
|
boolean keepRunning = true
|
||||||
int executions = 0
|
int executions = 0
|
||||||
|
|
|
@ -39,7 +39,7 @@ class InfluxClient {
|
||||||
BatchOptions options = BatchOptions.DEFAULTS.actions(300).flushDuration(500);
|
BatchOptions options = BatchOptions.DEFAULTS.actions(300).flushDuration(500);
|
||||||
influxDB.enableBatch(options);
|
influxDB.enableBatch(options);
|
||||||
|
|
||||||
influxDB.setLogLevel(InfluxDB.LogLevel.BASIC);
|
//influxDB.setLogLevel(InfluxDB.LogLevel.BASIC);
|
||||||
|
|
||||||
batchPoints = BatchPoints.database(database).precision(TimeUnit.SECONDS).build();
|
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