Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EXPERIMENTAL] Provide a way to output logs as json #4413

Closed
irevoire opened this issue Feb 14, 2024 · 1 comment
Closed

[EXPERIMENTAL] Provide a way to output logs as json #4413

irevoire opened this issue Feb 14, 2024 · 1 comment
Labels
enhancement New feature or improvement experimental feature Related to an experimental feature impacts docs This issue involves changes in the Meilisearch's documentation v1.7.0 PRs/issues solved in v1.7.0 released on 2024-03-11
Milestone

Comments

@irevoire
Copy link
Member

irevoire commented Feb 14, 2024

Related product team resources: PRD (internal only)
Related product discussion: https://github.com/orgs/meilisearch/discussions/723
Related spec: meilisearch/specifications#265

Motivation

When pushing our logs to a « log collector » like quickwit, loki, elastic search or anything else, having logs structured as json greatly eases search and filtering.

Usage

Starts meilisearch with the following CLI flag and specify if you wants your logs to be outputted as structured json or human readable logs:

./meilisearch --experimental-logs-mode json
# OR
./meilisearch --experimental-logs-mode human

Impacted teams

@meilisearch/docs-team new experimental feature just dropped

@irevoire irevoire added enhancement New feature or improvement experimental feature Related to an experimental feature labels Feb 14, 2024
@irevoire irevoire added this to the v1.7.0 milestone Feb 14, 2024
@curquiza curquiza added the impacts docs This issue involves changes in the Meilisearch's documentation label Feb 14, 2024
meili-bors bot added a commit that referenced this issue Feb 15, 2024
4410: Implement the experimental log mode cli flag and log level updates at runtime r=dureuill a=irevoire

# Pull Request
This PR fixes two issues at once because they’re highly correlated in the codebase.

## Related issue
Fixes #4415
Fixes #4413

## What does this PR do?
- It makes the fmt logger configurable to output json or human-readable logs (like we already do today)
- It moves the fmt logger under a `reload` layer so we can update its targets at runtime
- Add the possibility to stream logs in the json mode
- Adds an analytics for the new CLI flag

Co-authored-by: Tamo <tamo@meilisearch.com>
@curquiza
Copy link
Member

Closed by #4410

@meili-bot meili-bot added the v1.7.0 PRs/issues solved in v1.7.0 released on 2024-03-11 label Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement experimental feature Related to an experimental feature impacts docs This issue involves changes in the Meilisearch's documentation v1.7.0 PRs/issues solved in v1.7.0 released on 2024-03-11
Projects
None yet
Development

No branches or pull requests

3 participants