有没有办法为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
有什么方法可以为这些日志添加时间戳前缀。?这将有助于调试一些内部崩溃。
亲切的问候,雅各布。
答案 0 :(得分:2)
您可以在~/.dask/config.yaml
文件中提供日志格式字符串。以下是导致当前日志的当前默认值:
distributed:
admin:
log-format: '%(name)s - %(levelname)s - %(message)s'
有关更多格式选项,请参阅logging module documentation