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
Enable error logging #2003
Comments
The PR, at a glance, looks reasonable. |
I am going to have to remove the PR. It can have a large negative performance effect. |
Fixed by #2030 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Related issue #506
Feature Request
To enable logging of errors only. Currently, setting
SIMDJSON_VERBOSE_LOGGING
will log errors and other info. It would be nice to differentiate the logs into different levels and configure the log levels to be logged via an environment variable / compile option.Is this a feature that would be desired? Should we implement this with an environment variable or compile option?
Other notes
The motivation behind this is because I'd like to know the key passed in when we receive
NO_SUCH_FIELD
error code is returned. Enabling verbose logging would be too expensive, because I only need the logs when an error occurs.Possible Implementation
I am willing to help and make the changes.
My proposal is to use a environment variable
SIMDJSON_LOG_LEVEL
, which defaults toINFO
. To log error messages only, we compile withSIMDJSON_VERBOSE_LOGGING
and set the env variableSIMDJSON_LOG_LEVEL
toERROR
.log_level
in the logger with 2 levels,INFO
,ERROR
should_log(log_level)
in the logger class. It will fetch the env variable on first invocation.log_line
to take inlog_level
as an additional param (should I default this toINFO
?)log_line
do something likeThe text was updated successfully, but these errors were encountered: