summaryrefslogtreecommitdiffstats
path: root/node-maintainer
diff options
context:
space:
mode:
authorHarald Musum <musum@yahoo-inc.com>2017-04-06 08:09:56 +0200
committerHarald Musum <musum@yahoo-inc.com>2017-04-06 08:09:56 +0200
commit7f72eb0151dcabbb5fc5108bab1d952db117ae6b (patch)
tree48336f22329a23e97871025511e43bdb2e8c7522 /node-maintainer
parent05ad9689ffc3a5f439a66e5117c65119838db8d6 (diff)
Setup logging for node-maintainer
* Setup logging and use vespa.log when started from node-admin
Diffstat (limited to 'node-maintainer')
-rw-r--r--node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/maintainer/Maintainer.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/maintainer/Maintainer.java b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/maintainer/Maintainer.java
index 8a1751fe9a7..932681c4c26 100644
--- a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/maintainer/Maintainer.java
+++ b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/maintainer/Maintainer.java
@@ -1,6 +1,7 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.maintainer;
+import com.yahoo.log.LogSetup;
import com.yahoo.slime.ArrayTraverser;
import com.yahoo.slime.Inspector;
import com.yahoo.slime.Type;
@@ -26,13 +27,14 @@ public class Maintainer {
private static final HttpClient httpClient = HttpClientBuilder.create().build();
public static void main(String[] args) {
+ LogSetup.initVespaLogging("node-maintainer");
if (args.length != 1) {
throw new RuntimeException("Expected only 1 argument - a JSON list of maintainer jobs to execute");
}
Inspector object = SlimeUtils.jsonToSlime(args[0].getBytes()).get();
if (object.type() != Type.ARRAY) {
- throw new IllegalArgumentException("Expected a list maintainer jobs to execute");
+ throw new IllegalArgumentException("Expected a list of maintainer jobs to execute");
}
// Variable must be effectively final to be used in lambda expression