Skip to content

Instantly share code, notes, and snippets.

@kinisoftware
Created July 19, 2019 16:03
Show Gist options
  • Select an option

  • Save kinisoftware/bfa5732cbf83f09206c792b5e1c5ea1b to your computer and use it in GitHub Desktop.

Select an option

Save kinisoftware/bfa5732cbf83f09206c792b5e1c5ea1b to your computer and use it in GitHub Desktop.
// This request interceptor will log all incoming requests to this lambda
const LoggingRequestInterceptor = {
process(handlerInput) {
console.log(`Incoming request: ${JSON.stringify(handlerInput.requestEnvelope)}`);
}
};
// This response interceptor will log all outgoing responses of this lambda
const LoggingResponseInterceptor = {
process(handlerInput, response) {
console.log(`Outgoing response: ${JSON.stringify(response)}`);
}
};
module.exports = {
LoggingRequestInterceptor,
LoggingResponseInterceptor
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment