2

有没有办法向 Dask 调度程序/工作人员控制台日志添加/启用时间戳。?

dask:0.15.0-py35_0
分布式:1.17.1-py35_0

如果我使用上述版本,则未启用 -

调度器 -

distributed.scheduler - INFO - -----------------------------------------------
distributed.scheduler - INFO -   Scheduler at: tcp://192.168.200.23:8600
distributed.scheduler - INFO -       bokeh at:       192.168.200.23:8620
distributed.scheduler - INFO -        http at:       192.168.200.23:8610
distributed.scheduler - INFO - Local Directory: /jenkins_VegaFarm_edi-vf-3-4/workspace/AutoBATS/tmp/5896310/cbecb324-9b7c-46af-8ed7-5075aab3f225
distributed.scheduler - INFO - -----------------------------------------------
distributed.scheduler - INFO - Register tcp://192.168.200.23:33876
distributed.scheduler - INFO - Register tcp://192.168.200.23:43544
distributed.scheduler - INFO - Register tcp://192.168.200.23:43675
distributed.scheduler - INFO - Register tcp://192.168.200.23:39567
distributed.scheduler - INFO - Register tcp://192.168.200.23:33450
distributed.scheduler - INFO - Register tcp://192.168.200.23:42608
distributed.scheduler - INFO - Register tcp://192.168.200.23:36773
distributed.scheduler - INFO - Register tcp://192.168.200.23:43157
distributed.scheduler - INFO - Starting worker compute stream, tcp:/

工作人员 -

distributed.nanny - INFO -         Start Nanny at: 'tcp://192.168.200.23:33621'
distributed.nanny - INFO -         Start Nanny at: 'tcp://192.168.200.23:42826'
distributed.nanny - INFO -         Start Nanny at: 'tcp://192.168.200.23:37509'
distributed.nanny - INFO -         Start Nanny at: 'tcp://192.168.200.23:36526'
distributed.nanny - INFO -         Start Nanny at: 'tcp://192.168.200.23:46298'
distributed.nanny - INFO -         Start Nanny at: 'tcp://192.168.200.23:36025'
distributed.nanny - INFO -         Start Nanny at: 'tcp://192.168.200.23:46421'
distributed.nanny - INFO -         Start Nanny at: 'tcp://192.168.200.23:36029'
distributed.nanny - INFO -         Start Nanny at: 'tcp://192.168.200.23:41999'
distributed.worker - INFO -       Start worker at: tcp://192.168.200.23:33876
distributed.worker - INFO -              nanny at:       192.168.200.23:44329
distributed.worker - INFO -               http at:       192.168.200.23:34181
distributed.worker - INFO -              bokeh at:       192.168.200.23:8789
distributed.worker - INFO - Waiting to connect to:  tcp://192.168.200.23:8600
distributed.worker - INFO - -------------------------------------------------
distributed.worker - INFO -       Start worker at: tcp://192.168.200.23:33450
distributed.worker - INFO -              nanny at:       192.168.200.23:39203

有什么办法可以给这些日志加上时间戳。?这将有助于调试一些内部崩溃。

亲切的问候,雅各布。

4

1 回答 1

2

您可以在~/.dask/config.yaml文件中提供日志格式字符串。这是导致当前日志的当前默认值:

distributed:
  admin:
    log-format: '%(name)s - %(levelname)s - %(message)s'

有关更多格式选项,请参阅日志记录模块文档

于 2018-01-24T14:55:12.503 回答