-
-
Notifications
You must be signed in to change notification settings - Fork 888
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Configuration for console logging #618
Comments
@meirotstein that's good, thank you. I suggest calling the option
By default Ajv would simply assign I don't think there is any logging during validation apart from $comment keyword but it is off by default and it has its own option that enables it. |
HI @epoberezkin I like your suggestion - sounds better than just a simple boolean option. As for the current logging - you can find a call for console.warn() here, here and here |
in 5.4.0 |
What version of Ajv you are you using?
5.1.3
What problem do you want to solve?
Ajv uses console.warn to report some warnings to the console.
I had several issues with some consumers of my package (which uses Ajv) that on there site they have a customized version of the console object and they don't interested with the Ajv warnings, in some cases the customized version did not implemented the
warn
function what leads to an Error.This force these kind of sites to change the implementation of the console object in order to use packages that are depended in Ajv - which is not so easy when it comes to a large scale sites of big firms.
What do you think is the correct solution to problem?
I think that there should be a new option:
consoleLog
, default true, that when set to false there will be no reports to the console object whatsoever.Will you be able to implement it?
Yes
The text was updated successfully, but these errors were encountered: