You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In most scenarios, these console.error calls are unnecessary as errors will be thrown anyway, that should be handled by devs consuming this library. In other situations, errors aren't thrown, and these messages are useful. However, most devs are using custom loggers (like JSON loggers), and would like to be able to customize the logging behavior.
console.error(`Unknown spec version ${version}. Default to ${Version.V1}`);
I think probably the one you note is the only one that should be removed, as the one in src/messages/http is informational and an exception isn't thrown.
For informal logs, please consider adding the ability to specify the logger (maybe with the same interface as console), so that we can override with custom loggers.
Activity
lance commentedon Sep 2, 2020
Thanks @satazor for opening this issue. It actually looks like there are only two calls to
console.error()- the one you pointed out, and this onesdk-javascript/src/message/http/index.ts
Line 51 in 6cd310c
I think probably the one you note is the only one that should be removed, as the one in
src/messages/httpis informational and an exception isn't thrown.satazor commentedon Sep 2, 2020
@lance 👍
For informal logs, please consider adding the ability to specify the logger (maybe with the same interface as console), so that we can override with custom loggers.
github-actions commentedon Oct 3, 2020
This issue is stale because it has been open 30 days with no activity.
src(receiver)don't default specversion on receiving.
src(receiver)!: don't default specversion on receiving.
fix: do not modify incoming event's specversion
fix: do not modify incoming event's specversion (#419)
fix: do not modify incoming event's specversion (cloudevents#419)