【问题标题】:How to set log direction in Spring Cloud DataFlow如何在 Spring Cloud DataFlow 中设置日志方向
【发布时间】:2019-12-09 07:29:08
【问题描述】:

我已经设置了

spring.cloud.deployer.local.workingDirectoriesRoot=D:\\Deploy

在 application.properties 中定义日志文件夹。

但是,它不起作用,我启动时的任务日志写在 java.io.tmpdir (C:/..../temp/) 上。

我正在使用 spring-cloud-dataflow-server-core 版本 2.3.0.RELEASE 我需要将这些配置放入 dataflow-server.yml 吗? 如何配置 SCDF 的日志文件夹及其任务?

【问题讨论】:

标签: spring-cloud-dataflow


【解决方案1】:

我们刚刚为 windows 添加了一些测试,并注意到使用驱动器号时在 windows 上实际工作的正确格式(假设任务名称是时间戳)是:

deployer.timestamp.local.working-directories-root=file:/C:/tmp

想想在 Spring 世界中绑定从 Stringjava.nio.file.Path 是如何工作的。对于有兴趣了解更多的人,它是spring core的PathEditor,它使用Paths.get(URI),因此需要file:

【讨论】:

  • 你是正确的,但这对我有用:spring.cloud.dataflow.task.platform.local.accounts.default.working-directories-root = D:\\Deploy\\logs
【解决方案2】:

属性workingDirectoriesRootlocal 部署程序属性,而不是应用程序属性。因此,在启动任务时需要传递。

task launch <task-name> --properties "deployer.<task-name>.local.workingDirectoriesRoot=D:\\Deploy"

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-05-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-07-03
    相关资源
    最近更新 更多