-
Notifications
You must be signed in to change notification settings - Fork 213
Open
Description
Expected Behavior
When specifying loghandler AND forcing errors such as invalid requests to contentful, then errors should be logged.
logHandler: (level: string, data) => {
console.log('CONTENTFUL LOG', { level, data });
},
Actual Behavior
when configuring with our winston logger, no logs seen:
this.client = createClient({
environment: 'abc',
space: 'abc',
accessToken: 'abc',
logHandler: (level: string, data) => {
Logger.log(level, 'Contentful log', {
type: 'contentful',
properties: {
space: 'PIM',
data,
},
});
},
});when using console.log, no logs seen:
this.client = createClient({
environment: 'abc',
space: 'abc',
accessToken: 'abc',
logHandler: (level: string, data) => {
console.log('CONTENTFUL LOG', { level, data });
},
});Possible Solution
Steps to Reproduce
- Configure log handler
- Break a request. Eg
fields.slug[match]=>fields.slugskjhgjkdshgj[match] - no logging
Context
If contentful is logging useful debug info, I want that in my logs too
Environment
- Language Version: v20.10.0
- Package Manager Version: 10.2.3
- Browser Version:
- Operating System: 23.3.0 Darwin Kernel Version 23.3.0: Wed Dec 20 21:30:44 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6000 arm64
- Package Version: 10.6.5
- Which API are you using?: Delivery
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels