devour-js/devour-client

Add option to specify log level

JaZo opened this issue · 0 comments

JaZo commented

We use an API that has a lot of attributes and we haven't added all those to the model. This results in a spammed console with warnings such as "Resource response for type "calendar_item" contains attribute "expiration_date", but it is not present on model config and therefore not deserialized.". As such, we have disabled the logger. But the downside of disabling the logger is that errors aren't logged either. This made us overlook the issue I described in #228. Currently you can only enable/disable the logger, but it would be nice if you can specify the log level so you can hide the aforementioned warnings, but keep the errors.