@deephaven/log
A logging library that can be used for modules to log different levels of logging, intercept console logging, and store a history of logs in memory for later consumption or exporting.
Install
npm install --save @deephaven/log
Usage
import Log from '@deephaven/log'
import { LoggerLevel } from '@deephaven/log'
Log.setLogLevel(LoggerLevel.DEBUG2);
Log.info('basic info level log message');
const log = Log.module('MyModuleName');
log.debug2('debug2 level log message');
log.debug('debug level log message');
log.info('info level log message');
log.log('alias for log.info');
log.warn('warning level log message');
log.error('error level log message');
import { LogProxy } from '@deephaven/log';
const logProxy = new LogProxy();
logProxy.enable();
import { LogHistory } from '@deephaven/log';
const logHistory = new LogHistory(logProxy);
logHistory.enable();
Legal Notices
Deephaven Data Labs and any contributors grant you a license to the content of this repository under the Apache 2.0 License, see the LICENSE file.