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

Feature Request: Json Logging #8888

Open
lucasfcnunes opened this issue Feb 24, 2025 · 5 comments
Open

Feature Request: Json Logging #8888

lucasfcnunes opened this issue Feb 24, 2025 · 5 comments
Labels
customer issue enhancement New feature or request

Comments

@lucasfcnunes
Copy link

Description

# config.yaml - https://docs.dolthub.com/sql-reference/server/configuration#config.yaml
log_level: info
log_format: json # <<< new feature
# ...
@timsehn timsehn added the enhancement New feature or request label Feb 24, 2025
@timsehn
Copy link
Contributor

timsehn commented Feb 25, 2025

Good feature request. This should be pretty easy but we don't have a resource for it right now. We would welcome a contribution for it.

@damanV5
Copy link

damanV5 commented Feb 25, 2025

@timsehn I would like to contribute.

@timsehn
Copy link
Contributor

timsehn commented Feb 25, 2025

I think @zachmu would be the best person to point you in the right direction.

@zachmu
Copy link
Member

zachmu commented Feb 25, 2025

This should be pretty easy.

Here's where we configure our logger:

https://github.com/dolthub/dolt/blob/main/go/cmd/dolt/commands/sqlserver/server.go#L117

And here's where the config is defined:

https://github.com/dolthub/dolt/blob/main/go/libraries/doltcore/servercfg/yaml_config.go

That should be enough to get you started, let me know if you have questions.

@damanV5
Copy link

damanV5 commented Feb 25, 2025

@zachmu I have raised a PR. Let me know if that is the change that needs to be done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer issue enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants