import * as ApplicationInsights from "applicationinsights" ; import { channel , IStandardEvent } from "diagnostic-channel" ; channel . addContextPreservation ( ( cb ) => { return ApplicationInsights . wrapWithCorrelationContext ( cb ) ; } ) ; import { console as consolePub , enable as enablePublishers } from "diagnostic-channel-publishers" ; enablePublishers ( ) ; import "bunyan-sub" ; import "console-sub" ; import "mongodb-sub" ; import "mysql-sub" ; import "redis-sub" ; console . dir ( ( channel as any ) . getPatchesObject ( ) ) ; channel . subscribe ( "console" , function ( event ) { process . stdout . write ( "Console subscriber>\t" + event . data . message ) ; } ) ; console . log ( "Test message" ) ;