# set_log_level { #phasic.set_log_level }

```python
phasic.set_log_level(level='INFO', module=None)
```

Context manager and callable for changing the phasic logging level at runtime.

Can be used as a direct call to permanently change the level, or as a
context manager to temporarily change it.

## Parameters {.doc-section .doc-section-parameters}

<code>[**level**]{.parameter-name} [:]{.parameter-annotation-sep} [[str](`str`)]{.parameter-annotation} [ = ]{.parameter-default-sep} [\'INFO\']{.parameter-default}</code>

:   Logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL, NONE).

<code>[**module**]{.parameter-name} [:]{.parameter-annotation-sep} [[str](`str`) or None]{.parameter-annotation} [ = ]{.parameter-default-sep} [None]{.parameter-default}</code>

:   Specific module to configure. If None, sets level for entire package.

## Examples {.doc-section .doc-section-examples}

```python
>>> # Permanent change
>>> set_log_level('DEBUG')
```

```python
>>> # Temporary change via context manager
>>> with set_log_level('DEBUG'):
...     # debug logging active here
...     pass
```