diff options
author | Harald Musum <musum@yahoo-inc.com> | 2017-04-06 08:09:56 +0200 |
---|---|---|
committer | Harald Musum <musum@yahoo-inc.com> | 2017-04-06 08:09:56 +0200 |
commit | 7f72eb0151dcabbb5fc5108bab1d952db117ae6b (patch) | |
tree | 48336f22329a23e97871025511e43bdb2e8c7522 /node-admin | |
parent | 05ad9689ffc3a5f439a66e5117c65119838db8d6 (diff) |
Setup logging for node-maintainer
* Setup logging and use vespa.log when started from node-admin
Diffstat (limited to 'node-admin')
-rw-r--r-- | node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/StorageMaintainer.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/StorageMaintainer.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/StorageMaintainer.java index 6b4c40f352b..9313d238f9e 100644 --- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/StorageMaintainer.java +++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/StorageMaintainer.java @@ -33,6 +33,8 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.TimeUnit; import java.util.regex.Pattern; +import static com.yahoo.vespa.defaults.Defaults.getDefaults; + /** * @author freva */ @@ -267,10 +269,12 @@ public class StorageMaintainer { try { args = objectMapper.writeValueAsString(jobs); } catch (JsonProcessingException e) { - throw new RuntimeException("Failed trasform list of maintenance jobs to JSON"); + throw new RuntimeException("Failed transform list of maintenance jobs to JSON"); } - String[] command = {"java", "-cp", classPath, "com.yahoo.vespa.hosted.node.maintainer.Maintainer", args}; + String[] command = {"java", "-cp", classPath, + "-Dvespa.log.target=file:" + getDefaults().underVespaHome("logs/vespa/vespa.log"), + "com.yahoo.vespa.hosted.node.maintainer.Maintainer", args}; ProcessResult result = docker.executeInContainerAsRoot(executeIn, command); if (! result.isSuccess()) { |