A implementation of ILogger that writes to console.log
.
import { ILogger } from './ILogger';
export class ConsoleLogger implements ILogger {
public log(...args: any[]): void {
console.log.apply(console, arguments);
}
}
If your skill is hosted in AWS Lambda then the logs will appear in Amazon CloudWatch
//TypeScript
import { ConsoleLogger, ILogger } from "ask-community-interceptors";
const logger: ILogger = new ConsoleLogger();
//JavaScript
const Interceptors = require('ask-community-interceptors');
const logger = new Interceptors.ConsoleLogger();