hyperjumptech / grule-rule-engine

Rule engine implementation in Golang
Other
2.22k stars 346 forks source link

be able to set the log level to silent with logger.SetLogLevel #415

Open lauraeci opened 1 year ago

lauraeci commented 1 year ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

The problem I'm having is during the execution step, there are errors that are skipped because the engine detects that these facts don't have particular methods but the flag ReturnErrOnFailedRuleEvaluation is false so the execution should continue. These logs very noisy with the potential of flooding our cloud logging.

Describe the solution you'd like A clear and concise description of what you want to happen.

I would like to be able to completely silence the logs per environment so that an engineer can run verbosely while debugging but be silent in production. The issue seems to be that some panic-level logs are caught and logged using fmt and not the configurable logger.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered. I tried to change the logger.SetLogLevel but wasn't able to silence all logs.

Additional context Add any other context or screenshots about the feature request here. Happy to provide more context as needed. Thank you! Greatly appreciated. If there's any other work around please let me know.