A interface used in creating your own logger. This library includes ConsoleLogger which writes to console.log
.
export interface ILogger {
log(...args: any[]): void;
}
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();
Here is an example of how to use ILogger to create your own logger:
//TypeScript
import { ILogger } from './ILogger';
export class MyLogger implements ILogger {
public log(...args: any[]): void {
// implement log function
// console.log.apply(console, arguments);
}
}