import factory from './lib/factory' ; /**
 * Export logger based on environment.
 *
 * When inside of VSCode, use extension output channel,
 * Otherwise write to console.log/stdout.
 *
 * logs when in LS: language server output channel
 * logs on webviews: webview devtools
  */ let logger ; const isVSCodeContext = ( ) => { try { require . resolve ( 'vscode' ) ; return true ; } catch ( error ) { return false ; } } ; if ( process . env . PRODUCT === 'ext' && isVSCodeContext ( ) ) { logger = require ( './lib/vscode' ) . default ; } else { logger = require ( './lib/general' ) . default ; } export function createLogger ( ns ? , bindings = { } ) { if ( ! ns ) return logger ; return logger . child ( { ... bindings , ns } ) ; } export default logger ;