1

我正在使用 marathon 0.8.2 和 mesosphere docker 映像(标签 v0.8.2)。我正在将--logging_level warn标志传递给守护程序,但我仍然看到所有运行状况检查都通过了(日志级别 INFO)。

47f1eff08164        mesosphere/marathon:v0.8.2            "./bin/start --maste   About an hour ago   Up About an hour                        mesos_marathon

来自 docker inspect 的片段:

  "CMD": [
        "--master",
        "zk://zk_host1:2181,zk_host2:2181,zk_host3:2181/mesos",
        "--zk",
        "zk://zk_host1:2181,zk_host2:2181,zk_host3:2181/marathon",
        "--hostname",
        "marathon_host",
        "--max_tasks_per_offer",
        "10",
        "--http_port",
        "80",
        "--logging_level",
        "warn"
    ],

参数通过ps

java -jar ./bin/../target/marathon-assembly-0.8.2.jar --master zk://zk_host1:2181,zk_host2:2181,zk_host3:2181/mesos --zk zk://zk_host1:2181,zk_host2:2181,zk_host3:2181/marathon --hostname marathon_host --max_tasks_per_offer 10 --http_port 80 --logging_level warn

但是,当我查看时docker logs mesos_marathon,我看到了很多信息:

[INFO] [06/16/2015 15:49:25.302] [marathon-akka.actor.default-dispatcher-7] [akka://marathon/user/$f] 收到的健康结果 [Healthy(microbot.edb72ab0- 143e-11e5-8fb0-56847afe9799,2015-06-16T15:46:24.346Z,2015-06-16T15:49:25.206Z)]

[INFO] [06/16/2015 15:49:25.302] [marathon-akka.actor.default-dispatcher-7] [akka://marathon/user/$f] 收到的健康结果:[Healthy(microbot.e6946214 -143e-11e5-8fb0-56847afe9799,2015-06-16T15:46:24.346Z,2015-06-16T15:49:25.206Z)]

[INFO] [06/16/2015 15:49:25.302] [marathon-akka.actor.default-dispatcher-7] [akka://marathon/user/$f] 收到的健康结果:[Healthy(microbot.ea257847 -143e-11e5-8fb0-56847afe9799,2015-06-16T15:46:24.346Z,2015-06-16T15:49:25.206Z)]

[INFO] [06/16/2015 15:49:25.302] [marathon-akka.actor.default-dispatcher-7] [akka://marathon/user/$f] 收到的健康结果:[Healthy(microbot.ff9ac8c5 -143e-11e5-8fb0-56847afe9799,2015-06-16T15:46:24.346Z,2015-06-16T15:49:25.207Z)]

[INFO] [06/16/2015 15:49:25.302] [marathon-akka.actor.default-dispatcher-7] [akka://marathon/user/$f] 收到的健康结果:[Healthy(microbot.edbf8e46 -143e-11e5-8fb0-56847afe9799,2015-06-16T15:46:24.346Z,2015-06-16T15:49:25.207Z)]

[INFO] [06/16/2015 15:49:25.303] [marathon-akka.actor.default-dispatcher-7] [akka://marathon/user/$f] 收到的健康结果:[Healthy(microbot.f888a2eb -143e-11e5-8fb0-56847afe9799,2015-06-16T15:46:24.346Z,2015-06-16T15:49:25.208Z)]

[INFO] [06/16/2015 15:49:25.303] [marathon-akka.actor.default-dispatcher-7] [akka://marathon/user/$f] 收到的健康结果:[Healthy(microbot.edbc80f0 -143e-11e5-8fb0-56847afe9799,2015-06-16T15:46:24.346Z,2015-06-16T15:49:25.208Z)]

我当然错过了一些东西。

4

1 回答 1

0

Akka 不使用特定的日志记录后端,它只是打印到标准输出。要配置 Akka 日志记录,请参考:http ://doc.akka.io/docs/akka/snapshot/java/logging.html 。

/logging您还可以使用端点对马拉松日志记录进行更细粒度的控制。所以访问<marathon_url>/logging在 Marathon 运行时配置日志记录

于 2015-10-13T20:16:21.950 回答