dask / dask/distributed

Old-style logging configuration sets defaults but new-style logging does not

Open
#8,391 0 comments 0 reactions 0 assignees View on GitHub
bug config
Dominant language
Python
Stars
1.7k
Forks
778
Avg merge
2h 50m
Merged PRs (30d)
3

Description

# Problem

When using "old-style" logging, i.e., not specifying `version`, `distributed` sets default levels and handlers:
```python3
import dask
import logging

dask.config.set({"distributed.logging": {}})
import distributed
logger = logging.getLogger("distributed")
```

```python3
>>> logger

```
```python3
>>> logger.handlers
[]
```

When using "new-style" logging, `distributed` does not set any defaults or handlers:
```python3
import dask
import logging

dask.config.set({"distributed.logging": {"version": 1}})
import distributed
logger = logging.getLogger("distributed")
```
```python3
>>> logger

```
```python3
>>> logger.handlers
[]
```

# Expected behavior

The two configuration methods should behave the same way.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.