diff --git a/src/capture.js b/src/capture.js index 72f9a2d..6d6d562 100644 --- a/src/capture.js +++ b/src/capture.js @@ -3,7 +3,7 @@ import isNumber from 'underscore/modules/isNumber.js'; import noop from 'underscore/modules/noop.js'; import { applyOwn } from './apply'; -import { isObject } from './is.js'; +import { isObject } from './is'; import { warn } from './log'; const o = { diff --git a/src/log.js b/src/log.js index a6f1a9a..c3ba584 100644 --- a/src/log.js +++ b/src/log.js @@ -34,6 +34,8 @@ export function log() { if (enabled) { _info.apply(c, parse(this, arguments)); } + + return enabled; } export function debug() { @@ -42,6 +44,8 @@ export function debug() { if (enabled > 1) { (enabled > 2 ? _trace : _debug).apply(c, parse(this, arguments)); } + + return enabled; } function parse(scope, args) { @@ -76,6 +80,9 @@ applyOwn(log, { enable: (level = 1) => enabled = level, + enabled: () => + enabled, + disable: () => enabled = 0, });