You are reading the documentation for v7.x and earlier, which is no longer the latest version. Switch to v8.x
Logger
SAP Commerce Cloud integration provides a logger that can be customized to fit your needs.
Good to know Logger configuration is optional and can be skipped.
The logger must implement the Logger interface interface.
export function getSapccConfig() {
// ...
return {
location: "@vsf-enterprise/sapcc-api/server",
configuration: {
// ...
logger: {
debug: (message, ...args) => {
// your implementation
// eg.console.log(message, ...args);
},
error: (message, ...args) => {
// your implementation
// eg.console.log(message, ...args);
},
info: (message, ...args) => {
// your implementation
// eg.console.log(message, ...args);
},
success: (message, ...args) => {
// your implementation
// eg.console.log(message, ...args);
},
},
},
} satisfies Integration<MiddlewareConfig>;
}You can disable the logger by setting the value to false. It will mute all logs.
export function getSapccConfig() {
// ...
return {
location: "@vsf-enterprise/sapcc-api/server",
configuration: {
// ...
logger: false,
},
} satisfies Integration<MiddlewareConfig>;
}