Skip to content

Latest commit

 

History

History
33 lines (23 loc) · 741 Bytes

ConsoleLogger.md

File metadata and controls

33 lines (23 loc) · 741 Bytes

ConsoleLogger

A implementation of ILogger that writes to console.log.

Usage

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

Examples

//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();