c56bef871b
CodeQL / Analyze (python) (push) Has been cancelled
Update Platform Components Table / update (push) Has been cancelled
Docker image release / Build base image (push) Has been cancelled
Sync docs with Docusaurus / sync (push) Has been cancelled
Tests / Check if changed (push) Has been cancelled
Tests / format (push) Has been cancelled
Tests / check-imports (push) Has been cancelled
Tests / Unit / macos-latest (push) Has been cancelled
Tests / Unit / ubuntu-latest (push) Has been cancelled
Tests / Unit / windows-latest (push) Has been cancelled
Tests / mypy (push) Has been cancelled
Tests / Integration / ubuntu-latest (push) Has been cancelled
Tests / Integration / macos-latest (push) Has been cancelled
Tests / Integration / windows-latest (push) Has been cancelled
Tests / notify-slack-on-failure (push) Has been cancelled
Tests / Mark tests as completed (push) Has been cancelled
19 lines
896 B
YAML
19 lines
896 B
YAML
---
|
|
features:
|
|
- |
|
|
Haystack now supports structured logging out-of-the box.
|
|
Logging can be separated into 3 categories:
|
|
- If [`structlog`](https://www.structlog.org/en/stable/) is not installed, Haystack will
|
|
use the standard Python logging library with whatever configuration is present.
|
|
- If `structlog` is installed, Haystack will log through [`structlog`](https://www.structlog.org/en/stable/) using
|
|
structlog's console renderer.
|
|
To disable structlog, set the environment variable `HAYSTACK_LOGGING_IGNORE_STRUCTLOG_ENV_VAR` to `true`.
|
|
- To log in JSON, install [`structlog`](https://www.structlog.org/en/stable/) and
|
|
- set the environment variable `HAYSTACK_LOGGING_JSON` to `true` or
|
|
- enable JSON logging from Python
|
|
```python
|
|
import haystack.logging
|
|
|
|
haystack.logging.configure_logging(use_json=True)
|
|
```
|