Skip to content
This repository has been archived by the owner. It is now read-only.

Add option to customize log level in enable #150

Merged
merged 2 commits into from Mar 18, 2019
Merged

Add option to customize log level in enable #150

merged 2 commits into from Mar 18, 2019

Conversation

@c-w
Copy link
Contributor

@c-w c-w commented Mar 1, 2019

This removes an assumption that the log level should always be INFO by enabling users to call the function like so:

import logging
from applicationinsights.logging import enable

enable('my-instrumentation-key', level=logging.DEBUG)

It could be argued the the same can be achieved via: enable('key').setLevel(logging.DEBUG), but this somewhat leaks the logging handler implementation detail and leaves the current implicit INFO level undocumented.

c-w and others added 2 commits Mar 1, 2019
This removes an assumption that the log level should always be INFO by
enabling users to call the function like so:

```py
import logging
from applicationinsights.logging import enable

enable('my-instrumentation-key', level=logging.DEBUG)
```
@SergeyKanzhelev SergeyKanzhelev merged commit af804ce into microsoft:develop Mar 18, 2019
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants