import { OutputChannel , window } from "vscode" ; import ILoggerStrategy , { LogLevels } from "./ILoggerStrategy" ; export class implements ILoggerStrategy export default class VSCChannelLoggerStrategy implements ILoggerStrategy { private readonly channel : OutputChannel ; param { string } channelName param { LogLevels } level memberof public constructor ( public readonly channelName , public readonly level = LogLevels . Debug ) { this . channel = window . createOutputChannel ( channelName ) ; } public log ( level , message , contextID = "\t" ) { this . channel . appendLine ( `${ new Date ( ) . toISOString ( ) } ${ contextID } ${ level } ${ message }` ) ; } }