standard-log 8.0.1 → 9.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +57 -133
- package/{esm/console/createConsoleLogReporter.d.ts → cjs/console.d.ts} +5 -5
- package/cjs/console.d.ts.map +1 -0
- package/cjs/console.js +74 -0
- package/cjs/console.js.map +1 -0
- package/cjs/console.spec.d.ts +2 -0
- package/cjs/console.spec.d.ts.map +1 -0
- package/cjs/{console/createConsoleLogReporter.spec.js → console.spec.js} +50 -68
- package/cjs/console.spec.js.map +1 -0
- package/cjs/errors.d.ts +0 -10
- package/cjs/errors.d.ts.map +1 -1
- package/cjs/errors.js +1 -43
- package/cjs/errors.js.map +1 -1
- package/cjs/formatter.d.ts +6 -0
- package/cjs/formatter.d.ts.map +1 -0
- package/cjs/formatter.js +46 -0
- package/cjs/formatter.js.map +1 -0
- package/cjs/formatter.spec.d.ts +2 -0
- package/cjs/formatter.spec.d.ts.map +1 -0
- package/cjs/formatter.spec.js +32 -0
- package/cjs/formatter.spec.js.map +1 -0
- package/cjs/global.d.ts +13 -0
- package/cjs/global.d.ts.map +1 -0
- package/cjs/global.js +33 -0
- package/cjs/global.js.map +1 -0
- package/cjs/global.spec.d.ts +2 -0
- package/cjs/global.spec.d.ts.map +1 -0
- package/cjs/global.spec.js +32 -0
- package/cjs/global.spec.js.map +1 -0
- package/cjs/index.d.ts +6 -14
- package/cjs/index.d.ts.map +1 -1
- package/cjs/index.js +11 -14
- package/cjs/index.js.map +1 -1
- package/cjs/logLevels.d.ts +60 -0
- package/cjs/logLevels.d.ts.map +1 -0
- package/cjs/logLevels.js +87 -0
- package/cjs/logLevels.js.map +1 -0
- package/cjs/logStore.d.ts +20 -0
- package/cjs/logStore.d.ts.map +1 -0
- package/cjs/logStore.js +44 -0
- package/cjs/logStore.js.map +1 -0
- package/cjs/logStore.spec.d.ts +2 -0
- package/cjs/logStore.spec.d.ts.map +1 -0
- package/cjs/logStore.spec.js +93 -0
- package/cjs/logStore.spec.js.map +1 -0
- package/cjs/logger.d.ts +5 -0
- package/cjs/logger.d.ts.map +1 -0
- package/cjs/logger.js +99 -0
- package/cjs/logger.js.map +1 -0
- package/{esm/memory/MemoryLogReporter.d.ts → cjs/memory.d.ts} +2 -2
- package/cjs/memory.d.ts.map +1 -0
- package/cjs/memory.js +39 -0
- package/cjs/memory.js.map +1 -0
- package/cjs/memory.spec.d.ts +2 -0
- package/cjs/memory.spec.d.ts.map +1 -0
- package/cjs/memory.spec.js +115 -0
- package/cjs/memory.spec.js.map +1 -0
- package/cjs/package.json +1 -3
- package/cjs/platform.browser.d.ts +6 -0
- package/cjs/platform.browser.d.ts.map +1 -0
- package/cjs/platform.browser.js +7 -0
- package/cjs/platform.browser.js.map +1 -0
- package/cjs/platform.d.ts +6 -0
- package/cjs/platform.d.ts.map +1 -0
- package/cjs/platform.js +9 -0
- package/cjs/platform.js.map +1 -0
- package/cjs/standardLog.d.ts +28 -0
- package/cjs/standardLog.d.ts.map +1 -0
- package/cjs/standardLog.js +65 -0
- package/cjs/standardLog.js.map +1 -0
- package/cjs/standardLog.spec.d.ts +2 -0
- package/cjs/standardLog.spec.d.ts.map +1 -0
- package/cjs/standardLog.spec.js +548 -0
- package/cjs/standardLog.spec.js.map +1 -0
- package/cjs/testUtil.d.ts +7 -5
- package/cjs/testUtil.d.ts.map +1 -1
- package/cjs/testUtil.js +11 -14
- package/cjs/testUtil.js.map +1 -1
- package/cjs/types.d.ts +33 -24
- package/cjs/types.d.ts.map +1 -1
- package/cjs/types.js.map +1 -1
- package/dist/standard-log.es5.js +355 -1071
- package/dist/standard-log.es5.js.gz +0 -0
- package/dist/standard-log.es5.js.map +1 -1
- package/dist/standard-log.es5.js.map.gz +0 -0
- package/dist/standard-log.esm.js +353 -1135
- package/dist/standard-log.esm.js.gz +0 -0
- package/dist/standard-log.esm.js.map +1 -1
- package/dist/standard-log.esm.js.map.gz +0 -0
- package/{cjs/console/createConsoleLogReporter.d.ts → esm/console.d.ts} +5 -5
- package/esm/console.d.ts.map +1 -0
- package/esm/console.js +62 -0
- package/esm/console.js.map +1 -0
- package/esm/console.spec.d.ts +2 -0
- package/esm/console.spec.d.ts.map +1 -0
- package/esm/{console/createConsoleLogReporter.spec.js → console.spec.js} +50 -65
- package/esm/console.spec.js.map +1 -0
- package/esm/errors.d.ts +0 -10
- package/esm/errors.d.ts.map +1 -1
- package/esm/errors.js +0 -34
- package/esm/errors.js.map +1 -1
- package/esm/formatter.d.ts +6 -0
- package/esm/formatter.d.ts.map +1 -0
- package/esm/{formatter/createTimestampFormatter.js → formatter.js} +10 -2
- package/esm/formatter.js.map +1 -0
- package/esm/formatter.spec.d.ts +2 -0
- package/esm/formatter.spec.d.ts.map +1 -0
- package/esm/formatter.spec.js +30 -0
- package/esm/formatter.spec.js.map +1 -0
- package/esm/global.d.ts +13 -0
- package/esm/global.d.ts.map +1 -0
- package/esm/global.js +28 -0
- package/esm/global.js.map +1 -0
- package/esm/global.spec.d.ts +2 -0
- package/esm/global.spec.d.ts.map +1 -0
- package/esm/global.spec.js +30 -0
- package/esm/global.spec.js.map +1 -0
- package/esm/index.d.ts +6 -14
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +6 -14
- package/esm/index.js.map +1 -1
- package/esm/logLevels.d.ts +60 -0
- package/esm/logLevels.d.ts.map +1 -0
- package/esm/{logLevel.js → logLevels.js} +29 -3
- package/esm/logLevels.js.map +1 -0
- package/esm/logStore.d.ts +20 -0
- package/esm/logStore.d.ts.map +1 -0
- package/esm/logStore.js +37 -0
- package/esm/logStore.js.map +1 -0
- package/esm/logStore.spec.d.ts +2 -0
- package/esm/logStore.spec.d.ts.map +1 -0
- package/esm/logStore.spec.js +93 -0
- package/esm/logStore.spec.js.map +1 -0
- package/esm/logger.d.ts +5 -0
- package/esm/logger.d.ts.map +1 -0
- package/esm/logger.js +75 -0
- package/esm/logger.js.map +1 -0
- package/{cjs/memory/MemoryLogReporter.d.ts → esm/memory.d.ts} +2 -2
- package/esm/memory.d.ts.map +1 -0
- package/esm/memory.js +34 -0
- package/esm/memory.js.map +1 -0
- package/esm/memory.spec.d.ts +2 -0
- package/esm/memory.spec.d.ts.map +1 -0
- package/esm/memory.spec.js +110 -0
- package/esm/memory.spec.js.map +1 -0
- package/esm/platform.browser.d.ts +6 -0
- package/esm/platform.browser.d.ts.map +1 -0
- package/esm/platform.browser.js +3 -0
- package/esm/platform.browser.js.map +1 -0
- package/esm/platform.d.ts +6 -0
- package/esm/platform.d.ts.map +1 -0
- package/esm/platform.js +5 -0
- package/esm/platform.js.map +1 -0
- package/esm/standardLog.d.ts +28 -0
- package/esm/standardLog.d.ts.map +1 -0
- package/esm/standardLog.js +41 -0
- package/esm/standardLog.js.map +1 -0
- package/esm/standardLog.spec.d.ts +2 -0
- package/esm/standardLog.spec.d.ts.map +1 -0
- package/esm/standardLog.spec.js +446 -0
- package/esm/standardLog.spec.js.map +1 -0
- package/esm/testUtil.d.ts +7 -5
- package/esm/testUtil.d.ts.map +1 -1
- package/esm/testUtil.js +8 -12
- package/esm/testUtil.js.map +1 -1
- package/esm/types.d.ts +33 -24
- package/esm/types.d.ts.map +1 -1
- package/esm/types.js.map +1 -1
- package/package.json +10 -19
- package/ts/console.ts +70 -0
- package/ts/errors.ts +0 -12
- package/ts/{formatter/createTimestampFormatter.ts → formatter.ts} +12 -1
- package/ts/global.ts +34 -0
- package/ts/index.ts +9 -14
- package/ts/{logLevel.ts → logLevels.ts} +20 -3
- package/ts/logStore.ts +52 -0
- package/ts/logger.ts +85 -0
- package/ts/memory.ts +47 -0
- package/ts/platform.browser.ts +5 -0
- package/ts/platform.ts +8 -0
- package/ts/standardLog.ts +65 -0
- package/ts/types.ts +39 -30
- package/cjs/LogEntry.d.ts +0 -7
- package/cjs/LogEntry.d.ts.map +0 -1
- package/cjs/LogEntry.js +0 -3
- package/cjs/LogEntry.js.map +0 -1
- package/cjs/captureLogs.d.ts +0 -4
- package/cjs/captureLogs.d.ts.map +0 -1
- package/cjs/captureLogs.js +0 -33
- package/cjs/captureLogs.js.map +0 -1
- package/cjs/captureLogs.spec.d.ts +0 -2
- package/cjs/captureLogs.spec.d.ts.map +0 -1
- package/cjs/captureLogs.spec.js +0 -117
- package/cjs/captureLogs.spec.js.map +0 -1
- package/cjs/config.d.ts +0 -12
- package/cjs/config.d.ts.map +0 -1
- package/cjs/config.js +0 -59
- package/cjs/config.js.map +0 -1
- package/cjs/config.spec.d.ts +0 -2
- package/cjs/config.spec.d.ts.map +0 -1
- package/cjs/config.spec.js +0 -72
- package/cjs/config.spec.js.map +0 -1
- package/cjs/configForTest.d.ts +0 -5
- package/cjs/configForTest.d.ts.map +0 -1
- package/cjs/configForTest.js +0 -18
- package/cjs/configForTest.js.map +0 -1
- package/cjs/configForTest.spec.d.ts +0 -2
- package/cjs/configForTest.spec.d.ts.map +0 -1
- package/cjs/configForTest.spec.js +0 -17
- package/cjs/configForTest.spec.js.map +0 -1
- package/cjs/console/createConsoleLogReporter.d.ts.map +0 -1
- package/cjs/console/createConsoleLogReporter.js +0 -42
- package/cjs/console/createConsoleLogReporter.js.map +0 -1
- package/cjs/console/createConsoleLogReporter.spec.d.ts +0 -2
- package/cjs/console/createConsoleLogReporter.spec.d.ts.map +0 -1
- package/cjs/console/createConsoleLogReporter.spec.js.map +0 -1
- package/cjs/console/index.d.ts +0 -4
- package/cjs/console/index.d.ts.map +0 -1
- package/cjs/console/index.js +0 -20
- package/cjs/console/index.js.map +0 -1
- package/cjs/console/isConsoleDebugAvailable.d.ts +0 -2
- package/cjs/console/isConsoleDebugAvailable.d.ts.map +0 -1
- package/cjs/console/isConsoleDebugAvailable.js +0 -20
- package/cjs/console/isConsoleDebugAvailable.js.map +0 -1
- package/cjs/console/polyfilledConsole.d.ts +0 -7
- package/cjs/console/polyfilledConsole.d.ts.map +0 -1
- package/cjs/console/polyfilledConsole.js +0 -41
- package/cjs/console/polyfilledConsole.js.map +0 -1
- package/cjs/console/semverGt.d.ts +0 -2
- package/cjs/console/semverGt.d.ts.map +0 -1
- package/cjs/console/semverGt.js +0 -13
- package/cjs/console/semverGt.js.map +0 -1
- package/cjs/console/semverGt.spec.d.ts +0 -2
- package/cjs/console/semverGt.spec.d.ts.map +0 -1
- package/cjs/console/semverGt.spec.js +0 -22
- package/cjs/console/semverGt.spec.js.map +0 -1
- package/cjs/console/toConsoleMethod.d.ts +0 -2
- package/cjs/console/toConsoleMethod.d.ts.map +0 -1
- package/cjs/console/toConsoleMethod.js +0 -22
- package/cjs/console/toConsoleMethod.js.map +0 -1
- package/cjs/console/types.d.ts +0 -3
- package/cjs/console/types.d.ts.map +0 -1
- package/cjs/console/types.js +0 -3
- package/cjs/console/types.js.map +0 -1
- package/cjs/customLogLevel.d.ts +0 -11
- package/cjs/customLogLevel.d.ts.map +0 -1
- package/cjs/customLogLevel.js +0 -38
- package/cjs/customLogLevel.js.map +0 -1
- package/cjs/customLogLevel.spec.d.ts +0 -2
- package/cjs/customLogLevel.spec.d.ts.map +0 -1
- package/cjs/customLogLevel.spec.js +0 -37
- package/cjs/customLogLevel.spec.js.map +0 -1
- package/cjs/formatter/createTimestampFormatter.d.ts +0 -3
- package/cjs/formatter/createTimestampFormatter.d.ts.map +0 -1
- package/cjs/formatter/createTimestampFormatter.js +0 -26
- package/cjs/formatter/createTimestampFormatter.js.map +0 -1
- package/cjs/formatter/createTimestampFormatter.spec.d.ts +0 -2
- package/cjs/formatter/createTimestampFormatter.spec.d.ts.map +0 -1
- package/cjs/formatter/createTimestampFormatter.spec.js +0 -23
- package/cjs/formatter/createTimestampFormatter.spec.js.map +0 -1
- package/cjs/formatter/formatLogLevel.d.ts +0 -2
- package/cjs/formatter/formatLogLevel.d.ts.map +0 -1
- package/cjs/formatter/formatLogLevel.js +0 -10
- package/cjs/formatter/formatLogLevel.js.map +0 -1
- package/cjs/formatter/index.d.ts +0 -4
- package/cjs/formatter/index.d.ts.map +0 -1
- package/cjs/formatter/index.js +0 -20
- package/cjs/formatter/index.js.map +0 -1
- package/cjs/formatter/plainLogFormatter.d.ts +0 -3
- package/cjs/formatter/plainLogFormatter.d.ts.map +0 -1
- package/cjs/formatter/plainLogFormatter.js +0 -19
- package/cjs/formatter/plainLogFormatter.js.map +0 -1
- package/cjs/formatter/plainLogFormatter.spec.d.ts +0 -2
- package/cjs/formatter/plainLogFormatter.spec.d.ts.map +0 -1
- package/cjs/formatter/plainLogFormatter.spec.js +0 -9
- package/cjs/formatter/plainLogFormatter.spec.js.map +0 -1
- package/cjs/getDefaultReporter.browser.d.ts +0 -2
- package/cjs/getDefaultReporter.browser.d.ts.map +0 -1
- package/cjs/getDefaultReporter.browser.js +0 -15
- package/cjs/getDefaultReporter.browser.js.map +0 -1
- package/cjs/getDefaultReporter.d.ts +0 -2
- package/cjs/getDefaultReporter.d.ts.map +0 -1
- package/cjs/getDefaultReporter.js +0 -19
- package/cjs/getDefaultReporter.js.map +0 -1
- package/cjs/getLogModeFromEnvironment.browser.d.ts +0 -3
- package/cjs/getLogModeFromEnvironment.browser.d.ts.map +0 -1
- package/cjs/getLogModeFromEnvironment.browser.js +0 -9
- package/cjs/getLogModeFromEnvironment.browser.js.map +0 -1
- package/cjs/getLogModeFromEnvironment.d.ts +0 -3
- package/cjs/getLogModeFromEnvironment.d.ts.map +0 -1
- package/cjs/getLogModeFromEnvironment.js +0 -17
- package/cjs/getLogModeFromEnvironment.js.map +0 -1
- package/cjs/getLogModeFromEnvironment.spec.d.ts +0 -2
- package/cjs/getLogModeFromEnvironment.spec.d.ts.map +0 -1
- package/cjs/getLogModeFromEnvironment.spec.js +0 -25
- package/cjs/getLogModeFromEnvironment.spec.js.map +0 -1
- package/cjs/getLogger.d.ts +0 -9
- package/cjs/getLogger.d.ts.map +0 -1
- package/cjs/getLogger.js +0 -103
- package/cjs/getLogger.js.map +0 -1
- package/cjs/getLogger.spec.d.ts +0 -2
- package/cjs/getLogger.spec.d.ts.map +0 -1
- package/cjs/getLogger.spec.js +0 -485
- package/cjs/getLogger.spec.js.map +0 -1
- package/cjs/getLoggers.d.ts +0 -7
- package/cjs/getLoggers.d.ts.map +0 -1
- package/cjs/getLoggers.js +0 -15
- package/cjs/getLoggers.js.map +0 -1
- package/cjs/logLevel.d.ts +0 -106
- package/cjs/logLevel.d.ts.map +0 -1
- package/cjs/logLevel.js +0 -59
- package/cjs/logLevel.js.map +0 -1
- package/cjs/logLevel.spec.d.ts +0 -2
- package/cjs/logLevel.spec.d.ts.map +0 -1
- package/cjs/logLevel.spec.js +0 -195
- package/cjs/logLevel.spec.js.map +0 -1
- package/cjs/logLevelFn.d.ts +0 -20
- package/cjs/logLevelFn.d.ts.map +0 -1
- package/cjs/logLevelFn.js +0 -76
- package/cjs/logLevelFn.js.map +0 -1
- package/cjs/logReporter.d.ts +0 -7
- package/cjs/logReporter.d.ts.map +0 -1
- package/cjs/logReporter.js +0 -29
- package/cjs/logReporter.js.map +0 -1
- package/cjs/logReporter.spec.d.ts +0 -2
- package/cjs/logReporter.spec.d.ts.map +0 -1
- package/cjs/logReporter.spec.js +0 -98
- package/cjs/logReporter.spec.js.map +0 -1
- package/cjs/logReporterInternal.d.ts +0 -3
- package/cjs/logReporterInternal.d.ts.map +0 -1
- package/cjs/logReporterInternal.js +0 -23
- package/cjs/logReporterInternal.js.map +0 -1
- package/cjs/memory/MemoryLogReporter.d.ts.map +0 -1
- package/cjs/memory/MemoryLogReporter.js +0 -56
- package/cjs/memory/MemoryLogReporter.js.map +0 -1
- package/cjs/memory/MemoryLogReporter.spec.d.ts +0 -2
- package/cjs/memory/MemoryLogReporter.spec.d.ts.map +0 -1
- package/cjs/memory/MemoryLogReporter.spec.js +0 -124
- package/cjs/memory/MemoryLogReporter.spec.js.map +0 -1
- package/cjs/memory/index.d.ts +0 -3
- package/cjs/memory/index.d.ts.map +0 -1
- package/cjs/memory/index.js +0 -19
- package/cjs/memory/index.js.map +0 -1
- package/cjs/memory/logEntriesToString.d.ts +0 -3
- package/cjs/memory/logEntriesToString.d.ts.map +0 -1
- package/cjs/memory/logEntriesToString.js +0 -10
- package/cjs/memory/logEntriesToString.js.map +0 -1
- package/cjs/memory/logEntriesToString.spec.d.ts +0 -2
- package/cjs/memory/logEntriesToString.spec.d.ts.map +0 -1
- package/cjs/memory/logEntriesToString.spec.js +0 -36
- package/cjs/memory/logEntriesToString.spec.js.map +0 -1
- package/cjs/memory/toInspectStringForObject.d.ts +0 -3
- package/cjs/memory/toInspectStringForObject.d.ts.map +0 -1
- package/cjs/memory/toInspectStringForObject.js +0 -17
- package/cjs/memory/toInspectStringForObject.js.map +0 -1
- package/cjs/shouldLog.d.ts +0 -8
- package/cjs/shouldLog.d.ts.map +0 -1
- package/cjs/shouldLog.js +0 -14
- package/cjs/shouldLog.js.map +0 -1
- package/cjs/store.d.ts +0 -3
- package/cjs/store.d.ts.map +0 -1
- package/cjs/store.js +0 -27
- package/cjs/store.js.map +0 -1
- package/cjs/suppressLogs.d.ts +0 -6
- package/cjs/suppressLogs.d.ts.map +0 -1
- package/cjs/suppressLogs.js +0 -17
- package/cjs/suppressLogs.js.map +0 -1
- package/cjs/suppressLogs.spec.d.ts +0 -2
- package/cjs/suppressLogs.spec.d.ts.map +0 -1
- package/cjs/suppressLogs.spec.js +0 -31
- package/cjs/suppressLogs.spec.js.map +0 -1
- package/cjs/typesInternal.d.ts +0 -20
- package/cjs/typesInternal.d.ts.map +0 -1
- package/cjs/typesInternal.js +0 -3
- package/cjs/typesInternal.js.map +0 -1
- package/cjs/utils.d.ts +0 -6
- package/cjs/utils.d.ts.map +0 -1
- package/cjs/utils.js +0 -15
- package/cjs/utils.js.map +0 -1
- package/cjs/writeToReporters.d.ts +0 -6
- package/cjs/writeToReporters.d.ts.map +0 -1
- package/cjs/writeToReporters.js +0 -22
- package/cjs/writeToReporters.js.map +0 -1
- package/cjs/writeToReporters.spec.d.ts +0 -2
- package/cjs/writeToReporters.spec.d.ts.map +0 -1
- package/cjs/writeToReporters.spec.js +0 -59
- package/cjs/writeToReporters.spec.js.map +0 -1
- package/esm/LogEntry.d.ts +0 -7
- package/esm/LogEntry.d.ts.map +0 -1
- package/esm/LogEntry.js +0 -2
- package/esm/LogEntry.js.map +0 -1
- package/esm/captureLogs.d.ts +0 -4
- package/esm/captureLogs.d.ts.map +0 -1
- package/esm/captureLogs.js +0 -29
- package/esm/captureLogs.js.map +0 -1
- package/esm/captureLogs.spec.d.ts +0 -2
- package/esm/captureLogs.spec.d.ts.map +0 -1
- package/esm/captureLogs.spec.js +0 -45
- package/esm/captureLogs.spec.js.map +0 -1
- package/esm/config.d.ts +0 -12
- package/esm/config.d.ts.map +0 -1
- package/esm/config.js +0 -44
- package/esm/config.js.map +0 -1
- package/esm/config.spec.d.ts +0 -2
- package/esm/config.spec.d.ts.map +0 -1
- package/esm/config.spec.js +0 -67
- package/esm/config.spec.js.map +0 -1
- package/esm/configForTest.d.ts +0 -5
- package/esm/configForTest.d.ts.map +0 -1
- package/esm/configForTest.js +0 -14
- package/esm/configForTest.js.map +0 -1
- package/esm/configForTest.spec.d.ts +0 -2
- package/esm/configForTest.spec.d.ts.map +0 -1
- package/esm/configForTest.spec.js +0 -15
- package/esm/configForTest.spec.js.map +0 -1
- package/esm/console/createConsoleLogReporter.d.ts.map +0 -1
- package/esm/console/createConsoleLogReporter.js +0 -37
- package/esm/console/createConsoleLogReporter.js.map +0 -1
- package/esm/console/createConsoleLogReporter.spec.d.ts +0 -2
- package/esm/console/createConsoleLogReporter.spec.d.ts.map +0 -1
- package/esm/console/createConsoleLogReporter.spec.js.map +0 -1
- package/esm/console/index.d.ts +0 -4
- package/esm/console/index.d.ts.map +0 -1
- package/esm/console/index.js +0 -4
- package/esm/console/index.js.map +0 -1
- package/esm/console/isConsoleDebugAvailable.d.ts +0 -2
- package/esm/console/isConsoleDebugAvailable.d.ts.map +0 -1
- package/esm/console/isConsoleDebugAvailable.js +0 -13
- package/esm/console/isConsoleDebugAvailable.js.map +0 -1
- package/esm/console/polyfilledConsole.d.ts +0 -7
- package/esm/console/polyfilledConsole.d.ts.map +0 -1
- package/esm/console/polyfilledConsole.js +0 -32
- package/esm/console/polyfilledConsole.js.map +0 -1
- package/esm/console/semverGt.d.ts +0 -2
- package/esm/console/semverGt.d.ts.map +0 -1
- package/esm/console/semverGt.js +0 -9
- package/esm/console/semverGt.js.map +0 -1
- package/esm/console/semverGt.spec.d.ts +0 -2
- package/esm/console/semverGt.spec.d.ts.map +0 -1
- package/esm/console/semverGt.spec.js +0 -20
- package/esm/console/semverGt.spec.js.map +0 -1
- package/esm/console/toConsoleMethod.d.ts +0 -2
- package/esm/console/toConsoleMethod.d.ts.map +0 -1
- package/esm/console/toConsoleMethod.js +0 -18
- package/esm/console/toConsoleMethod.js.map +0 -1
- package/esm/console/types.d.ts +0 -3
- package/esm/console/types.d.ts.map +0 -1
- package/esm/console/types.js +0 -2
- package/esm/console/types.js.map +0 -1
- package/esm/customLogLevel.d.ts +0 -11
- package/esm/customLogLevel.d.ts.map +0 -1
- package/esm/customLogLevel.js +0 -30
- package/esm/customLogLevel.js.map +0 -1
- package/esm/customLogLevel.spec.d.ts +0 -2
- package/esm/customLogLevel.spec.d.ts.map +0 -1
- package/esm/customLogLevel.spec.js +0 -32
- package/esm/customLogLevel.spec.js.map +0 -1
- package/esm/formatter/createTimestampFormatter.d.ts +0 -3
- package/esm/formatter/createTimestampFormatter.d.ts.map +0 -1
- package/esm/formatter/createTimestampFormatter.js.map +0 -1
- package/esm/formatter/createTimestampFormatter.spec.d.ts +0 -2
- package/esm/formatter/createTimestampFormatter.spec.d.ts.map +0 -1
- package/esm/formatter/createTimestampFormatter.spec.js +0 -21
- package/esm/formatter/createTimestampFormatter.spec.js.map +0 -1
- package/esm/formatter/formatLogLevel.d.ts +0 -2
- package/esm/formatter/formatLogLevel.d.ts.map +0 -1
- package/esm/formatter/formatLogLevel.js +0 -6
- package/esm/formatter/formatLogLevel.js.map +0 -1
- package/esm/formatter/index.d.ts +0 -4
- package/esm/formatter/index.d.ts.map +0 -1
- package/esm/formatter/index.js +0 -4
- package/esm/formatter/index.js.map +0 -1
- package/esm/formatter/plainLogFormatter.d.ts +0 -3
- package/esm/formatter/plainLogFormatter.d.ts.map +0 -1
- package/esm/formatter/plainLogFormatter.js +0 -5
- package/esm/formatter/plainLogFormatter.js.map +0 -1
- package/esm/formatter/plainLogFormatter.spec.d.ts +0 -2
- package/esm/formatter/plainLogFormatter.spec.d.ts.map +0 -1
- package/esm/formatter/plainLogFormatter.spec.js +0 -7
- package/esm/formatter/plainLogFormatter.spec.js.map +0 -1
- package/esm/getDefaultReporter.browser.d.ts +0 -2
- package/esm/getDefaultReporter.browser.d.ts.map +0 -1
- package/esm/getDefaultReporter.browser.js +0 -11
- package/esm/getDefaultReporter.browser.js.map +0 -1
- package/esm/getDefaultReporter.d.ts +0 -2
- package/esm/getDefaultReporter.d.ts.map +0 -1
- package/esm/getDefaultReporter.js +0 -15
- package/esm/getDefaultReporter.js.map +0 -1
- package/esm/getLogModeFromEnvironment.browser.d.ts +0 -3
- package/esm/getLogModeFromEnvironment.browser.d.ts.map +0 -1
- package/esm/getLogModeFromEnvironment.browser.js +0 -5
- package/esm/getLogModeFromEnvironment.browser.js.map +0 -1
- package/esm/getLogModeFromEnvironment.d.ts +0 -3
- package/esm/getLogModeFromEnvironment.d.ts.map +0 -1
- package/esm/getLogModeFromEnvironment.js +0 -13
- package/esm/getLogModeFromEnvironment.js.map +0 -1
- package/esm/getLogModeFromEnvironment.spec.d.ts +0 -2
- package/esm/getLogModeFromEnvironment.spec.d.ts.map +0 -1
- package/esm/getLogModeFromEnvironment.spec.js +0 -20
- package/esm/getLogModeFromEnvironment.spec.js.map +0 -1
- package/esm/getLogger.d.ts +0 -9
- package/esm/getLogger.d.ts.map +0 -1
- package/esm/getLogger.js +0 -78
- package/esm/getLogger.js.map +0 -1
- package/esm/getLogger.spec.d.ts +0 -2
- package/esm/getLogger.spec.d.ts.map +0 -1
- package/esm/getLogger.spec.js +0 -385
- package/esm/getLogger.spec.js.map +0 -1
- package/esm/getLoggers.d.ts +0 -7
- package/esm/getLoggers.d.ts.map +0 -1
- package/esm/getLoggers.js +0 -11
- package/esm/getLoggers.js.map +0 -1
- package/esm/logLevel.d.ts +0 -106
- package/esm/logLevel.d.ts.map +0 -1
- package/esm/logLevel.js.map +0 -1
- package/esm/logLevel.spec.d.ts +0 -2
- package/esm/logLevel.spec.d.ts.map +0 -1
- package/esm/logLevel.spec.js +0 -148
- package/esm/logLevel.spec.js.map +0 -1
- package/esm/logLevelFn.d.ts +0 -20
- package/esm/logLevelFn.d.ts.map +0 -1
- package/esm/logLevelFn.js +0 -67
- package/esm/logLevelFn.js.map +0 -1
- package/esm/logReporter.d.ts +0 -7
- package/esm/logReporter.d.ts.map +0 -1
- package/esm/logReporter.js +0 -21
- package/esm/logReporter.js.map +0 -1
- package/esm/logReporter.spec.d.ts +0 -2
- package/esm/logReporter.spec.d.ts.map +0 -1
- package/esm/logReporter.spec.js +0 -93
- package/esm/logReporter.spec.js.map +0 -1
- package/esm/logReporterInternal.d.ts +0 -3
- package/esm/logReporterInternal.d.ts.map +0 -1
- package/esm/logReporterInternal.js +0 -19
- package/esm/logReporterInternal.js.map +0 -1
- package/esm/memory/MemoryLogReporter.d.ts.map +0 -1
- package/esm/memory/MemoryLogReporter.js +0 -51
- package/esm/memory/MemoryLogReporter.js.map +0 -1
- package/esm/memory/MemoryLogReporter.spec.d.ts +0 -2
- package/esm/memory/MemoryLogReporter.spec.d.ts.map +0 -1
- package/esm/memory/MemoryLogReporter.spec.js +0 -111
- package/esm/memory/MemoryLogReporter.spec.js.map +0 -1
- package/esm/memory/index.d.ts +0 -3
- package/esm/memory/index.d.ts.map +0 -1
- package/esm/memory/index.js +0 -3
- package/esm/memory/index.js.map +0 -1
- package/esm/memory/logEntriesToString.d.ts +0 -3
- package/esm/memory/logEntriesToString.d.ts.map +0 -1
- package/esm/memory/logEntriesToString.js +0 -6
- package/esm/memory/logEntriesToString.js.map +0 -1
- package/esm/memory/logEntriesToString.spec.d.ts +0 -2
- package/esm/memory/logEntriesToString.spec.d.ts.map +0 -1
- package/esm/memory/logEntriesToString.spec.js +0 -42
- package/esm/memory/logEntriesToString.spec.js.map +0 -1
- package/esm/memory/toInspectStringForObject.d.ts +0 -3
- package/esm/memory/toInspectStringForObject.d.ts.map +0 -1
- package/esm/memory/toInspectStringForObject.js +0 -11
- package/esm/memory/toInspectStringForObject.js.map +0 -1
- package/esm/shouldLog.d.ts +0 -8
- package/esm/shouldLog.d.ts.map +0 -1
- package/esm/shouldLog.js +0 -10
- package/esm/shouldLog.js.map +0 -1
- package/esm/store.d.ts +0 -3
- package/esm/store.d.ts.map +0 -1
- package/esm/store.js +0 -24
- package/esm/store.js.map +0 -1
- package/esm/suppressLogs.d.ts +0 -6
- package/esm/suppressLogs.d.ts.map +0 -1
- package/esm/suppressLogs.js +0 -9
- package/esm/suppressLogs.js.map +0 -1
- package/esm/suppressLogs.spec.d.ts +0 -2
- package/esm/suppressLogs.spec.d.ts.map +0 -1
- package/esm/suppressLogs.spec.js +0 -29
- package/esm/suppressLogs.spec.js.map +0 -1
- package/esm/typesInternal.d.ts +0 -20
- package/esm/typesInternal.d.ts.map +0 -1
- package/esm/typesInternal.js +0 -2
- package/esm/typesInternal.js.map +0 -1
- package/esm/utils.d.ts +0 -6
- package/esm/utils.d.ts.map +0 -1
- package/esm/utils.js +0 -11
- package/esm/utils.js.map +0 -1
- package/esm/writeToReporters.d.ts +0 -6
- package/esm/writeToReporters.d.ts.map +0 -1
- package/esm/writeToReporters.js +0 -18
- package/esm/writeToReporters.js.map +0 -1
- package/esm/writeToReporters.spec.d.ts +0 -2
- package/esm/writeToReporters.spec.d.ts.map +0 -1
- package/esm/writeToReporters.spec.js +0 -9
- package/esm/writeToReporters.spec.js.map +0 -1
- package/ts/LogEntry.ts +0 -7
- package/ts/captureLogs.ts +0 -35
- package/ts/config.ts +0 -57
- package/ts/configForTest.ts +0 -16
- package/ts/console/createConsoleLogReporter.ts +0 -48
- package/ts/console/index.ts +0 -3
- package/ts/console/isConsoleDebugAvailable.ts +0 -11
- package/ts/console/polyfilledConsole.ts +0 -34
- package/ts/console/semverGt.ts +0 -9
- package/ts/console/toConsoleMethod.ts +0 -18
- package/ts/console/types.ts +0 -3
- package/ts/customLogLevel.ts +0 -35
- package/ts/formatter/formatLogLevel.ts +0 -6
- package/ts/formatter/index.ts +0 -3
- package/ts/formatter/plainLogFormatter.ts +0 -6
- package/ts/getDefaultReporter.browser.ts +0 -13
- package/ts/getDefaultReporter.ts +0 -15
- package/ts/getLogModeFromEnvironment.browser.ts +0 -6
- package/ts/getLogModeFromEnvironment.ts +0 -16
- package/ts/getLogger.ts +0 -92
- package/ts/getLoggers.ts +0 -12
- package/ts/logLevelFn.ts +0 -72
- package/ts/logReporter.ts +0 -26
- package/ts/logReporterInternal.ts +0 -18
- package/ts/memory/MemoryLogReporter.ts +0 -72
- package/ts/memory/index.ts +0 -2
- package/ts/memory/logEntriesToString.ts +0 -7
- package/ts/memory/toInspectStringForObject.ts +0 -13
- package/ts/shouldLog.ts +0 -11
- package/ts/store.ts +0 -25
- package/ts/suppressLogs.ts +0 -14
- package/ts/typesInternal.ts +0 -21
- package/ts/utils.ts +0 -11
- package/ts/writeToReporters.ts +0 -20
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"standardLog.spec.js","sourceRoot":"","sources":["../ts/standardLog.spec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAA0C;AAC1C,yCAAuC;AACvC,+CAA0D;AAC1D,yCAAqD;AACrD,mDAAyG;AACzG,6CAAmD;AAGnD,QAAQ,CAAC,qBAAqB,EAAE;IAC9B,QAAQ,CAAC,UAAU,EAAE;QACnB,EAAE,CAAC,oBAAoB,EAAE;YACvB,IAAM,MAAM,GAAG,IAAA,kCAAiB,GAAE,CAAA;YAClC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,wBAAS,CAAC,IAAI,CAAC,CAAA;QAC9C,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AC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACnB,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA","sourcesContent":["import { assertron as a } from 'assertron'\nimport { InvalidId } from './errors.js'\nimport { logLevels, toLogLevelName } from './logLevels.js'\nimport { createMemoryLogReporter } from './memory.js'\nimport { createStandardLog, createStandardLogForTest, StandardLog, suppressLogs } from './standardLog.js'\nimport { assertSSF, wrapTest } from './testUtil.js'\nimport { LogEntry, Logger, LoggerOptions, LogMethodNames, StandardLogOptions } from './types.js'\n\ndescribe('createStandardLog()', () => {\n describe('logLevel', () => {\n it('is default to info', () => {\n const actual = createStandardLog()\n expect(actual.logLevel).toBe(logLevels.info)\n })\n it('is readonly', () => {\n const actual = createStandardLog()\n a.throws(() => (actual as any).logLevel = logLevels.planck, err => /only a getter/.test(err))\n })\n it('set logLevel from options', () => {\n const actual = createStandardLog({ logLevel: logLevels.planck })\n expect(actual.logLevel).toBe(logLevels.planck)\n })\n })\n\n describe('custom levels', () => {\n it('can define custom levels', () => {\n const actual = createStandardLog({ customLevels: { urgent: 80 } })\n\n expect(actual.toLogLevelName(80)).toBe('urgent')\n })\n })\n\n describe('reporters', () => {\n it('can specify reporter', () => {\n const mem = createMemoryLogReporter()\n const sl = createStandardLog({ reporters: [mem] })\n const log = sl.getLogger(['x'])\n log.info('abc')\n expect(mem.logs.length).toBe(1)\n })\n })\n})\n\ndescribe('createStandardLogForTest()', () => {\n it('returns with memory reporter', () => {\n const { reporter } = createStandardLogForTest()\n expect(reporter.getLogMessageWithLevel()).toBe('')\n })\n\n it('defaults to debug', () => {\n const store = createStandardLogForTest()\n expect(store.logLevel).toBe(logLevels.debug)\n })\n})\n\ndescribe('getLogger()', () => {\n it('supports id with alphanumeric and :_-.', () => {\n const sl = createStandardLog()\n sl.getLogger(['abcdefghijklmnopqrstuvwxyz:-_.1234567890'])\n })\n it('supports id with unicode', () => {\n const sl = createStandardLog()\n sl.getLogger(['ミク香港'])\n })\n it('supports id with @, \\\\ and /', () => {\n const sl = createStandardLog()\n sl.getLogger(['@unional/fixture'])\n sl.getLogger([`a\\\\b\\\\c`])\n })\n it.each('`~!#$%^&*()=+|[]{}<>,?'.split(''))('throws if id has unsupported character %s', (char: string) => {\n const sl = createStandardLog()\n a.throws(() => sl.getLogger([char]), InvalidId)\n })\n it('throw InvalidId with ssf to the call site', () => {\n const sl = createStandardLog()\n const err = a.throws(() => sl.getLogger(['!']), InvalidId)\n\n assertSSF(err, __filename)\n })\n test('id is readonly', () => {\n const sl = createStandardLog()\n const log: any = sl.getLogger(['id is readonly'])\n a.throws(() => log.id = 'b')\n })\n\n test('get logger with same name gets the same instance', () => {\n const sl = createStandardLog()\n const expected = sl.getLogger(['same-inst'])\n const actual = sl.getLogger(['same-inst'])\n expect(actual).toBe(expected)\n })\n\n it('can specify local log level', () => {\n const sl = createStandardLog()\n const log = sl.getLogger(['local', { level: logLevels.trace }])\n expect(log.level).toBe(logLevels.trace)\n })\n\n test('new logger will get custom level', () => {\n const sl = createStandardLog({ customLevels: { 'to_logger': 1234 } })\n const actual = sl.getLogger(['to_logger_logger'])\n expect(typeof actual.to_logger).toBe('function')\n })\n\n it('Logger have at least the default log method names', () => {\n function wrapper<N extends string = LogMethodNames>(options: StandardLogOptions<N>) {\n const sl = createStandardLog<N>(options)\n // since `N` is generic, just `Logger<N>` will not have the default log method names.\n const log = sl.getLogger(['local'])\n expect(log.info).toBeDefined()\n return sl\n }\n\n const sl = wrapper({ customLevels: { 'cust': 123 } })\n const actual = sl.getLogger(['c'])\n expect(actual.cust).toBeDefined()\n })\n\n describe('log levels', () => {\n async function assertLoggedAtLevel(sl: ReturnType<typeof createStandardLogForTest>, method: LogMethodNames, level: number) {\n const log = sl.getLogger([method])\n const msg = `should log on level: ${level}`;\n (log as any)[method](msg)\n a.satisfies(sl.reporter.logs, [{ id: method, level: sl.toLogLevel(method), args: [msg] }])\n }\n\n async function assertNotLoggedAtLevel(sl: ReturnType<typeof createStandardLogForTest>, method: string, level: number) {\n const log = sl.getLogger([method]);\n (log as any)[method](`should not log on level: ${level}`)\n expect(sl.reporter.logs.length).toBe(0)\n }\n\n async function assertLoggedAtLocalLevel(sl: ReturnType<typeof createStandardLogForTest>, method: LogMethodNames, localLevel: number) {\n const log = sl.getLogger([method, { level: localLevel }])\n\n const msg = `should log on level: ${localLevel}`;\n (log as any)[method](msg)\n a.satisfies(sl.reporter.logs, [{ id: log.id, level: sl.toLogLevel(method), args: [msg] }])\n }\n\n async function assertNotLoggedAtLocalLevel(sl: ReturnType<typeof createStandardLogForTest>, method: string, localLevel: number) {\n const log = sl.getLogger([method, { level: localLevel }]);\n (log as any)[method](`should not log on level: ${localLevel}`)\n expect(sl.reporter.logs.length).toBe(0)\n }\n\n async function assertLoggedAtCallLevel(sl: ReturnType<typeof createStandardLogForTest>, method: string, callLevel: number) {\n const log = sl.getLogger([method])\n let actual = false\n log.on(callLevel, () => actual = true)\n expect(actual).toBe(true)\n }\n\n async function assertNotLoggedAtCallLevel(sl: ReturnType<typeof createStandardLogForTest>, method: string, callLevel: number, actualLevel: number) {\n const log = sl.getLogger([method])\n log.on(callLevel, () => { throw new Error(`should not log at level ${actualLevel}`) })\n }\n\n async function assertLoggedAtCallLevelOverrideLocalLevel(sl: ReturnType<typeof createStandardLogForTest>, method: string, localLevel: number, callLevel: number) {\n const log = sl.getLogger([method, { level: localLevel }])\n let actual = false\n log.on(callLevel, () => actual = true)\n expect(actual).toBe(true)\n }\n\n async function assertNotLoggedAtCallLevelOverrideLocalLevel(sl: ReturnType<typeof createStandardLogForTest>, method: string, localLevel: number, callLevel: number) {\n const log = sl.getLogger([method, { level: localLevel }])\n log.on(callLevel, () => { throw new Error(`should not log at level ${localLevel}`) })\n }\n\n const shouldLog = wrapTest((test) => (method: LogMethodNames, level: number) => {\n const sl = createStandardLogForTest(level)\n const name = sl.toLogLevelName(level)\n test(`${method}() should log on level: ${name} (${level})`, () => {\n return assertLoggedAtLevel(sl, method, level)\n })\n })\n const shouldNotLog = wrapTest((test) => (method: string, level: number) => {\n const sl = createStandardLogForTest(level)\n const name = sl.toLogLevelName(level)\n test(`${method}() should not log on level: ${name} (${level})`, () => {\n return assertNotLoggedAtLevel(sl, method, level)\n })\n })\n\n const shouldLogWithLocalLevelOverride = wrapTest((test) => (method: LogMethodNames, localLevel: number) => {\n const localName = toLogLevelName(localLevel);\n [logLevels.none, logLevels.error, logLevels.warn, logLevels.info, logLevels.debug].forEach(globalLevel => {\n const globalName = toLogLevelName(globalLevel) || 'none'\n test(`${method}() should log on local level: ${localName} (${localLevel}) while global level: ${globalName} (${globalLevel})`, () => {\n const sl = createStandardLogForTest(globalLevel)\n return assertLoggedAtLocalLevel(sl, method, localLevel)\n })\n })\n })\n\n const shouldNotLogWithLocalLevelOverride = wrapTest((test) => (method: string, localLevel: number) => {\n const localName = toLogLevelName(localLevel);\n\n [logLevels.none, logLevels.error, logLevels.warn, logLevels.info, logLevels.debug].forEach(globalLevel => {\n const globalName = toLogLevelName(globalLevel) || 'none'\n test(`${method}() should not log on local level: ${localName} (${localLevel}) while global level: ${globalName} (${globalLevel})`, () => {\n const sl = createStandardLogForTest(globalLevel)\n return assertNotLoggedAtLocalLevel(sl, method, localLevel)\n })\n })\n })\n\n const shouldCallLogFunction = wrapTest((test) => (callLevel: number, actualLevel: number) => {\n const method = toLogLevelName(callLevel)\n const name = toLogLevelName(actualLevel)\n test(`${method}() should call log function on level: ${name} (${actualLevel})`, () => {\n const sl = createStandardLogForTest(actualLevel)\n return assertLoggedAtCallLevel(sl, method, callLevel)\n })\n })\n\n const shouldNotCallLogFunction = wrapTest((test) => (callLevel: number, actualLevel: number) => {\n const method = toLogLevelName(callLevel)\n const name = toLogLevelName(actualLevel)\n test(`${method}() should not call log function on level: ${name} (${actualLevel})`, () => {\n const sl = createStandardLogForTest(actualLevel)\n return assertNotLoggedAtCallLevel(sl, method, callLevel, actualLevel)\n })\n })\n\n const shouldCallLogFunctionWithLocalLevelOverride = wrapTest((test) => (callLevel: number, localLevel: number) => {\n const method = toLogLevelName(callLevel)\n const localName = toLogLevelName(localLevel);\n\n [logLevels.none, logLevels.error, logLevels.warn, logLevels.info, logLevels.debug].forEach(globalLevel => {\n const globalName = toLogLevelName(globalLevel) || 'none'\n test(`${method}() should log on local level: ${localName} (${localLevel}) while global level: ${globalName} (${globalLevel})`, () => {\n const sl = createStandardLogForTest(globalLevel)\n return assertLoggedAtCallLevelOverrideLocalLevel(sl, method, localLevel, callLevel)\n })\n })\n })\n\n const shouldNotCallLogFunctionWithLocalLevelOverride = wrapTest((test) => (callLevel: number, localLevel: number) => {\n const method = toLogLevelName(callLevel)\n const localName = toLogLevelName(localLevel);\n\n [logLevels.none, logLevels.error, logLevels.warn, logLevels.info, logLevels.debug].forEach(globalLevel => {\n const globalName = toLogLevelName(globalLevel) || 'none'\n test(`${method}() should not log on local level: ${localName} (${localLevel}) while global level: ${globalName} (${globalLevel})`, () => {\n const sl = createStandardLogForTest(globalLevel)\n return assertNotLoggedAtCallLevelOverrideLocalLevel(sl, method, localLevel, callLevel)\n })\n })\n })\n\n shouldNotLog('error', logLevels.none)\n shouldLog('error', logLevels.error)\n shouldLog('error', logLevels.warn)\n shouldLog('error', logLevels.info)\n shouldLog('error', logLevels.debug)\n shouldNotLogWithLocalLevelOverride('error', logLevels.none)\n shouldLogWithLocalLevelOverride('error', logLevels.error)\n shouldLogWithLocalLevelOverride('error', logLevels.warn)\n shouldLogWithLocalLevelOverride('error', logLevels.info)\n shouldLogWithLocalLevelOverride('error', logLevels.debug)\n\n shouldNotLog('warn', logLevels.none)\n shouldNotLog('warn', logLevels.error)\n shouldLog('warn', logLevels.warn)\n shouldLog('warn', logLevels.info)\n shouldLog('warn', logLevels.debug)\n shouldNotLogWithLocalLevelOverride('warn', logLevels.none)\n shouldNotLogWithLocalLevelOverride('warn', logLevels.error)\n shouldLogWithLocalLevelOverride('warn', logLevels.warn)\n shouldLogWithLocalLevelOverride('warn', logLevels.info)\n shouldLogWithLocalLevelOverride('warn', logLevels.debug)\n\n shouldNotLog('info', logLevels.none)\n shouldNotLog('info', logLevels.error)\n shouldNotLog('info', logLevels.warn)\n shouldLog('info', logLevels.info)\n shouldLog('info', logLevels.debug)\n shouldNotLogWithLocalLevelOverride('info', logLevels.none)\n shouldNotLogWithLocalLevelOverride('info', logLevels.error)\n shouldNotLogWithLocalLevelOverride('info', logLevels.warn)\n shouldLogWithLocalLevelOverride('info', logLevels.info)\n shouldLogWithLocalLevelOverride('info', logLevels.debug)\n\n shouldNotLog('debug', logLevels.none)\n shouldNotLog('debug', logLevels.error)\n shouldNotLog('debug', logLevels.warn)\n shouldNotLog('debug', logLevels.info)\n shouldLog('debug', logLevels.debug)\n shouldNotLogWithLocalLevelOverride('debug', logLevels.none)\n shouldNotLogWithLocalLevelOverride('debug', logLevels.error)\n shouldNotLogWithLocalLevelOverride('debug', logLevels.warn)\n shouldNotLogWithLocalLevelOverride('debug', logLevels.info)\n shouldLogWithLocalLevelOverride('debug', logLevels.debug)\n\n shouldNotCallLogFunction(logLevels.error, logLevels.none)\n shouldCallLogFunction(logLevels.error, logLevels.error)\n shouldCallLogFunction(logLevels.error, logLevels.warn)\n shouldCallLogFunction(logLevels.error, logLevels.info)\n shouldCallLogFunction(logLevels.error, logLevels.debug)\n shouldNotCallLogFunctionWithLocalLevelOverride(logLevels.error, logLevels.none)\n shouldCallLogFunctionWithLocalLevelOverride(logLevels.error, logLevels.error)\n shouldCallLogFunctionWithLocalLevelOverride(logLevels.error, logLevels.warn)\n shouldCallLogFunctionWithLocalLevelOverride(logLevels.error, logLevels.info)\n shouldCallLogFunctionWithLocalLevelOverride(logLevels.error, logLevels.debug)\n\n shouldNotCallLogFunction(logLevels.warn, logLevels.none)\n shouldNotCallLogFunction(logLevels.warn, logLevels.error)\n shouldCallLogFunction(logLevels.warn, logLevels.warn)\n shouldCallLogFunction(logLevels.warn, logLevels.info)\n shouldCallLogFunction(logLevels.warn, logLevels.debug)\n shouldNotCallLogFunctionWithLocalLevelOverride(logLevels.warn, logLevels.none)\n shouldNotCallLogFunctionWithLocalLevelOverride(logLevels.warn, logLevels.error)\n shouldCallLogFunctionWithLocalLevelOverride(logLevels.warn, logLevels.warn)\n shouldCallLogFunctionWithLocalLevelOverride(logLevels.warn, logLevels.info)\n shouldCallLogFunctionWithLocalLevelOverride(logLevels.warn, logLevels.debug)\n\n shouldNotCallLogFunction(logLevels.info, logLevels.none)\n shouldNotCallLogFunction(logLevels.info, logLevels.error)\n shouldNotCallLogFunction(logLevels.info, logLevels.warn)\n shouldCallLogFunction(logLevels.info, logLevels.info)\n shouldCallLogFunction(logLevels.info, logLevels.debug)\n shouldNotCallLogFunctionWithLocalLevelOverride(logLevels.info, logLevels.none)\n shouldNotCallLogFunctionWithLocalLevelOverride(logLevels.info, logLevels.error)\n shouldNotCallLogFunctionWithLocalLevelOverride(logLevels.info, logLevels.warn)\n shouldCallLogFunctionWithLocalLevelOverride(logLevels.info, logLevels.info)\n shouldCallLogFunctionWithLocalLevelOverride(logLevels.info, logLevels.debug)\n\n shouldNotCallLogFunction(logLevels.debug, logLevels.none)\n shouldNotCallLogFunction(logLevels.debug, logLevels.error)\n shouldNotCallLogFunction(logLevels.debug, logLevels.warn)\n shouldNotCallLogFunction(logLevels.debug, logLevels.info)\n shouldCallLogFunction(logLevels.debug, logLevels.debug)\n shouldNotCallLogFunctionWithLocalLevelOverride(logLevels.debug, logLevels.none)\n shouldNotCallLogFunctionWithLocalLevelOverride(logLevels.debug, logLevels.error)\n shouldNotCallLogFunctionWithLocalLevelOverride(logLevels.debug, logLevels.warn)\n shouldNotCallLogFunctionWithLocalLevelOverride(logLevels.debug, logLevels.info)\n shouldCallLogFunctionWithLocalLevelOverride(logLevels.debug, logLevels.debug)\n })\n\n it('writes entry directly', () => {\n const sl = createStandardLogForTest()\n const log = sl.getLogger(['write-entry'])\n const entry = { id: 'write-entry', level: logLevels.info, args: ['abc'], timestamp: new Date() }\n log.write(entry)\n a.satisfies(sl.reporter.logs, [entry])\n })\n test.each(['on', 'count', 'error', 'warn', 'info', 'debug'])('method %s is readonly', name => {\n const sl = createStandardLog()\n const log: any = sl.getLogger([`${name} is readonly`])\n\n a.throws(() => log[name] = true)\n })\n\n\n describe('on()', () => {\n it('log using log argument', () => {\n const sl = createStandardLogForTest()\n const logger = sl.getLogger(['log on fn'])\n logger.on('error', log => { log('value') })\n\n a.satisfies(sl.reporter.logs, [\n { id: 'log on fn', level: logLevels.error, args: ['value'] }\n ])\n })\n it('can take log level name in first argument', () => {\n const sl = createStandardLogForTest()\n const log = sl.getLogger(['string-on'])\n log.on('debug', () => { return })\n })\n })\n describe('count()', () => {\n test('will increment the counter', async () => {\n const sl = createStandardLogForTest()\n const logger = sl.getLogger(['inc counter'])\n\n logger.count()\n logger.count()\n\n a.satisfies(sl.reporter.logs, [\n { id: 'inc counter', level: logLevels.debug, args: [1] },\n { id: 'inc counter', level: logLevels.debug, args: [2] }\n ])\n })\n\n test('append args after the counter', async () => {\n const sl = createStandardLogForTest(logLevels.debug)\n const id = 'inc with args'\n const logger = sl.getLogger([id])\n logger.count('msg1', 'msg2')\n\n a.satisfies(sl.reporter.logs, [\n { id, level: logLevels.debug, args: [1, 'msg1', 'msg2'] }\n ])\n })\n\n test('not log if log level is less than debug', async () => {\n const sl = createStandardLogForTest(logLevels.debug - 1)\n const id = 'inc with args'\n const logger = sl.getLogger([id])\n logger.count('msg1', 'msg2')\n\n expect(sl.reporter.logs.length).toBe(0)\n })\n })\n\n test('logger with custom level', async () => {\n const mem = createMemoryLogReporter()\n const sl = createStandardLog({ customLevels: { 'cust_lvl': 100 }, reporters: [mem] })\n const logger = sl.getLogger(['cust'])\n logger.cust_lvl('a', 'b')\n\n a.satisfies(mem.logs, [{ id: 'cust', level: 100, args: ['a', 'b'] }])\n })\n\n describe('getLogger([,{ writeTo }])', () => {\n function testWriteTo(\n loggerParams: [id: string, options: LoggerOptions],\n handler: (log: Logger, memLogs: LogEntry[], specialLogs: LogEntry[], sl: StandardLog) => void\n ) {\n const memReporter = createMemoryLogReporter()\n const specialReporter = createMemoryLogReporter({ id: 'special' })\n const sl = createStandardLog({ reporters: [memReporter, specialReporter] })\n\n const log = sl.getLogger(loggerParams)\n handler(log, memReporter.logs, specialReporter.logs, sl)\n }\n it('can specify which reporter to use by name', () => {\n testWriteTo(['writeTo-string', { writeTo: 'special' }], (log, memLogs, specialLogs) => {\n log.error('error message')\n expect(memLogs.length).toEqual(0)\n expect(specialLogs.length).toEqual(1)\n })\n })\n it('can specify which reporter to use by regex', () => {\n testWriteTo(['writeTo-regex', { writeTo: /^spec/ }], (log, memLogs, specialLogs) => {\n log.error('error message')\n expect(memLogs.length).toEqual(0)\n expect(specialLogs.length).toEqual(1)\n })\n })\n it('can specify which reporter to use by RegExp', () => {\n testWriteTo(['writeTo-RegExp', { writeTo: new RegExp('^spec') }], (log, memLogs, specialLogs) => {\n log.error('error message')\n expect(memLogs.length).toEqual(0)\n expect(specialLogs.length).toEqual(1)\n })\n })\n it('can specify which reporter to use by function', () => {\n testWriteTo(['writeTo-fn', { writeTo: id => id === 'special' }],\n (log, memLogs, specialLogs) => {\n log.error('error message')\n expect(memLogs.length).toEqual(0)\n expect(specialLogs.length).toEqual(1)\n })\n })\n it('can specify custom reporter', () => {\n const reporter = createMemoryLogReporter({ id: 'custom mem' })\n testWriteTo(['writeTo-reporter', { writeTo: reporter }],\n (log, memLogs, specialLogs) => {\n log.error('error message')\n expect(memLogs.length).toEqual(0)\n expect(specialLogs.length).toEqual(0)\n expect(reporter.logs.length).toEqual(1)\n })\n })\n\n test('the custom console reporter cannot pick up logs from other loggers', () => {\n // if not, it would be a security issue as the new reporter\n // can capture the logs from other logger and send it elsewhere\n const reporter = createMemoryLogReporter({ id: 'custom mem' })\n testWriteTo(['writeTo-reporter-no-override', { writeTo: reporter }],\n (_, memLogs, specialLogs, sl) => {\n const log = sl.getLogger(['writeTo-reporter-no-override-2'])\n log.error('error message')\n\n expect(reporter.logs.length).toEqual(0)\n })\n })\n })\n})\n\ndescribe('suppressLogs()', () => {\n test('suppress log', () => {\n const sl = createStandardLogForTest()\n const log = sl.getLogger(['l'])\n suppressLogs(() => {\n log.alert('should not see me')\n }, log)\n\n expect(sl.reporter.getLogMessageWithLevel()).toBe('')\n })\n\n test('suppress multiple logs', () => {\n const sl = createStandardLogForTest()\n const log1 = sl.getLogger(['l1'])\n const log2 = sl.getLogger(['l2'])\n suppressLogs(() => {\n log1.alert('should not see me')\n log2.alert('should not see me too')\n }, log1, log2)\n expect(sl.reporter.getLogMessageWithLevel()).toBe('')\n })\n\n test('return block result', () => {\n const sl = createStandardLogForTest()\n const log1 = sl.getLogger(['l'])\n const log2 = sl.getLogger(['l2'])\n const a = suppressLogs(() => 1, log1, log2)\n expect(a).toBe(1)\n })\n})\n"]}
|
package/cjs/testUtil.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="jest" />
|
|
2
|
+
import type { LogEntry } from './types.js';
|
|
2
3
|
export declare function rangeEntries(start: number, end: number, expected: any): any[][];
|
|
3
|
-
export declare function captureWrittenLog(): {
|
|
4
|
-
logs: LogEntry[];
|
|
5
|
-
reset(): void;
|
|
6
|
-
};
|
|
7
4
|
export declare function assertSSF(err: Error, filename: string): void;
|
|
5
|
+
export declare function logEntriesToString(logs: LogEntry[]): string;
|
|
6
|
+
export declare function wrapTest<F>(fn: (test: jest.It) => F): F & {
|
|
7
|
+
only: F;
|
|
8
|
+
skip: F;
|
|
9
|
+
};
|
|
8
10
|
//# sourceMappingURL=testUtil.d.ts.map
|
package/cjs/testUtil.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testUtil.d.ts","sourceRoot":"","sources":["../ts/testUtil.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"testUtil.d.ts","sourceRoot":"","sources":["../ts/testUtil.ts"],"names":[],"mappings":";AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAE1C,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,WAErE;AAED,wBAAgB,SAAS,CAAC,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,QAGrD;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,QAAQ,EAAE,UAElD;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,KAAK,CAAC;;;EAEnD"}
|
package/cjs/testUtil.js
CHANGED
|
@@ -3,29 +3,26 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.wrapTest = exports.logEntriesToString = exports.assertSSF = exports.rangeEntries = void 0;
|
|
7
7
|
var ramda_1 = __importDefault(require("ramda"));
|
|
8
|
-
var
|
|
8
|
+
var formatter_js_1 = require("./formatter.js");
|
|
9
|
+
var platform_js_1 = require("./platform.js");
|
|
9
10
|
function rangeEntries(start, end, expected) {
|
|
10
11
|
return ramda_1.default.range(start, end).map(function (value) { return ([value, expected]); });
|
|
11
12
|
}
|
|
12
13
|
exports.rangeEntries = rangeEntries;
|
|
13
|
-
function captureWrittenLog() {
|
|
14
|
-
var logs = [];
|
|
15
|
-
var orig = writeToReporters_js_1.writeToReporters.fn;
|
|
16
|
-
writeToReporters_js_1.writeToReporters.fn = function (l) { return logs.push(l); };
|
|
17
|
-
return {
|
|
18
|
-
logs: logs,
|
|
19
|
-
reset: function () {
|
|
20
|
-
writeToReporters_js_1.writeToReporters.fn = orig;
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
exports.captureWrittenLog = captureWrittenLog;
|
|
25
14
|
function assertSSF(err, filename) {
|
|
26
15
|
var _a;
|
|
27
16
|
var firstStackTrace = (_a = err.stack) === null || _a === void 0 ? void 0 : _a.split('\n')[1];
|
|
28
17
|
expect(firstStackTrace).toMatch(filename);
|
|
29
18
|
}
|
|
30
19
|
exports.assertSSF = assertSSF;
|
|
20
|
+
function logEntriesToString(logs) {
|
|
21
|
+
return logs.map(platform_js_1.toInspectLogEntry).map(formatter_js_1.plainLogFormatter).join('\n');
|
|
22
|
+
}
|
|
23
|
+
exports.logEntriesToString = logEntriesToString;
|
|
24
|
+
function wrapTest(fn) {
|
|
25
|
+
return Object.assign(fn(test), { only: fn(test.only), skip: fn(test.skip) });
|
|
26
|
+
}
|
|
27
|
+
exports.wrapTest = wrapTest;
|
|
31
28
|
//# sourceMappingURL=testUtil.js.map
|
package/cjs/testUtil.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testUtil.js","sourceRoot":"","sources":["../ts/testUtil.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAqB;
|
|
1
|
+
{"version":3,"file":"testUtil.js","sourceRoot":"","sources":["../ts/testUtil.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAqB;AACrB,+CAAkD;AAClD,6CAAiD;AAGjD,SAAgB,YAAY,CAAC,KAAa,EAAE,GAAW,EAAE,QAAa;IACpE,OAAO,eAAC,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,UAAA,KAAK,IAAI,OAAA,CAAC,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,EAAnB,CAAmB,CAAC,CAAA;AAC9D,CAAC;AAFD,oCAEC;AAED,SAAgB,SAAS,CAAC,GAAU,EAAE,QAAgB;;IACpD,IAAM,eAAe,GAAG,MAAA,GAAG,CAAC,KAAK,0CAAE,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAA;IACjD,MAAM,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;AAC3C,CAAC;AAHD,8BAGC;AAED,SAAgB,kBAAkB,CAAC,IAAgB;IACjD,OAAO,IAAI,CAAC,GAAG,CAAC,+BAAiB,CAAC,CAAC,GAAG,CAAC,gCAAiB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACtE,CAAC;AAFD,gDAEC;AAED,SAAgB,QAAQ,CAAI,EAAwB;IAClD,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAC9E,CAAC;AAFD,4BAEC","sourcesContent":["import R from 'ramda'\nimport { plainLogFormatter } from './formatter.js'\nimport { toInspectLogEntry } from './platform.js'\nimport type { LogEntry } from './types.js'\n\nexport function rangeEntries(start: number, end: number, expected: any) {\n return R.range(start, end).map(value => ([value, expected]))\n}\n\nexport function assertSSF(err: Error, filename: string) {\n const firstStackTrace = err.stack?.split('\\n')[1]\n expect(firstStackTrace).toMatch(filename)\n}\n\nexport function logEntriesToString(logs: LogEntry[]) {\n return logs.map(toInspectLogEntry).map(plainLogFormatter).join('\\n')\n}\n\nexport function wrapTest<F>(fn: (test: jest.It) => F) {\n return Object.assign(fn(test), { only: fn(test.only), skip: fn(test.skip) })\n}\n"]}
|
package/cjs/types.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
export declare type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export declare type LogEntry = {
|
|
6
|
-
id: string;
|
|
7
|
-
level: number;
|
|
8
|
-
args: any[];
|
|
9
|
-
timestamp: Date;
|
|
1
|
+
export declare type StandardLogOptions<CustomLevelNames extends string = string> = {
|
|
2
|
+
customLevels?: Record<CustomLevelNames, number>;
|
|
3
|
+
logLevel?: number;
|
|
4
|
+
reporters?: LogReporter[];
|
|
10
5
|
};
|
|
6
|
+
export interface LoggerOptions {
|
|
7
|
+
level?: number;
|
|
8
|
+
writeTo?: LogReporter | ReporterFilter;
|
|
9
|
+
}
|
|
11
10
|
export declare type Logger<T extends string = LogMethodNames> = {
|
|
12
11
|
readonly id: string;
|
|
13
12
|
/**
|
|
@@ -22,17 +21,28 @@ export declare type Logger<T extends string = LogMethodNames> = {
|
|
|
22
21
|
on(level: number | T, logFunction: LogFunction): void;
|
|
23
22
|
/**
|
|
24
23
|
* Write custom log entries.
|
|
25
|
-
* This can be used along with `captureLogs()` to rewrite the logs at a later time.
|
|
26
24
|
*/
|
|
27
25
|
write(entry: LogEntry): void;
|
|
28
26
|
} & {
|
|
29
27
|
[k in T]: LogMethod;
|
|
30
28
|
};
|
|
29
|
+
/**
|
|
30
|
+
* Names of the standard log methods.
|
|
31
|
+
*/
|
|
32
|
+
export declare type LogMethodNames = 'emergency' | 'alert' | 'critical' | 'error' | 'warn' | 'notice' | 'info' | 'debug' | 'trace' | 'planck';
|
|
33
|
+
export declare type LogEntry = {
|
|
34
|
+
id: string;
|
|
35
|
+
level: number;
|
|
36
|
+
args: any[];
|
|
37
|
+
timestamp: Date;
|
|
38
|
+
};
|
|
39
|
+
export declare type LogMethod = (...args: any[]) => void;
|
|
40
|
+
export declare type LogFunction = ((log: LogMethod) => void) | (() => string);
|
|
31
41
|
export declare type ReporterFilter = string | RegExp | ((reporterId: string) => boolean);
|
|
32
42
|
/**
|
|
33
43
|
* Formats a log entry.
|
|
34
44
|
* Depends on the reporter, it can expect a different return type.
|
|
35
|
-
* By default the return type is `any[]` which `console` accepts.
|
|
45
|
+
* By default the return type is `any[]` which the `console` accepts.
|
|
36
46
|
*/
|
|
37
47
|
export declare type LogFormatter<T = any[]> = (entry: LogEntry) => T;
|
|
38
48
|
/**
|
|
@@ -43,31 +53,24 @@ export declare type LogLevelEntry = {
|
|
|
43
53
|
name: string;
|
|
44
54
|
level: number;
|
|
45
55
|
};
|
|
46
|
-
export
|
|
47
|
-
|
|
48
|
-
id: string;
|
|
56
|
+
export interface LogReporter<T = any> {
|
|
57
|
+
readonly id: string;
|
|
49
58
|
/**
|
|
50
59
|
* Specifies the formatter to be used by the reporter.
|
|
51
60
|
* Using this you can customize how the reporter writes the log entry.
|
|
52
|
-
* This is readonly in production mode.
|
|
53
61
|
*/
|
|
54
|
-
formatter: LogFormatter<T>;
|
|
62
|
+
readonly formatter: LogFormatter<T>;
|
|
55
63
|
/**
|
|
56
64
|
* Specifies a filter to determine should the log be written.
|
|
57
|
-
* This is readonly in production mode.
|
|
58
65
|
*/
|
|
59
|
-
filter?: LogFilter;
|
|
66
|
+
readonly filter?: LogFilter;
|
|
60
67
|
/**
|
|
61
68
|
* Indicate if this is a console reporter.
|
|
62
69
|
* There is only one console reporter can be present in the system.
|
|
63
|
-
* If a new console reporter is added,
|
|
64
|
-
* it will be used in place of the existing one.
|
|
65
|
-
* However, existing filter will be carried over to ensure logs should not be shown remain not shown.
|
|
66
|
-
* If the new reporter also contains a filter, they will be combined.
|
|
67
70
|
*/
|
|
68
|
-
isConsoleReporter?: boolean;
|
|
71
|
+
readonly isConsoleReporter?: boolean;
|
|
69
72
|
write(entry: LogEntry): void;
|
|
70
|
-
}
|
|
73
|
+
}
|
|
71
74
|
export declare type LogReporterOptions<T = any> = {
|
|
72
75
|
id?: string;
|
|
73
76
|
/**
|
|
@@ -81,4 +84,10 @@ export declare type LogReporterOptions<T = any> = {
|
|
|
81
84
|
filter?: LogFilter;
|
|
82
85
|
};
|
|
83
86
|
export declare type LogLevel = number;
|
|
87
|
+
export interface ConsoleLike {
|
|
88
|
+
debug(...args: any[]): void;
|
|
89
|
+
info(...args: any[]): void;
|
|
90
|
+
warn(...args: any[]): void;
|
|
91
|
+
error(...args: any[]): void;
|
|
92
|
+
}
|
|
84
93
|
//# sourceMappingURL=types.d.ts.map
|
package/cjs/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../ts/types.ts"],"names":[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EAAE,GAAG,IAAI,CAAC;IAC5B,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;IAC3B,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;IAC3B,KAAK,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;CAC7B"}
|
package/cjs/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../ts/types.ts"],"names":[],"mappings":"","sourcesContent":["
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../ts/types.ts"],"names":[],"mappings":"","sourcesContent":["export type StandardLogOptions<CustomLevelNames extends string = string> = {\n customLevels?: Record<CustomLevelNames, number>,\n logLevel?: number,\n reporters?: LogReporter[]\n}\n\nexport interface LoggerOptions {\n level?: number,\n writeTo?: LogReporter | ReporterFilter\n}\n\nexport type Logger<T extends string = LogMethodNames> = {\n readonly id: string,\n /**\n * Logger local log level.\n */\n level?: number,\n /**\n * Logs with an increment counter.\n * This is useful during debugging to check for steps executed.\n */\n count(...args: any[]): void,\n on(level: number | T, logFunction: LogFunction): void,\n /**\n * Write custom log entries.\n */\n write(entry: LogEntry): void\n} & { [k in T]: LogMethod }\n\n/**\n * Names of the standard log methods.\n */\nexport type LogMethodNames = 'emergency' | 'alert' | 'critical' | 'error' | 'warn' | 'notice' | 'info' | 'debug' | 'trace' | 'planck'\n\nexport type LogEntry = {\n id: string,\n level: number,\n // args instead of messages because it is `any[]` instead of `string[]`\n args: any[],\n timestamp: Date\n}\n\nexport type LogMethod = (...args: any[]) => void\n\nexport type LogFunction = ((log: LogMethod) => void) | (() => string)\n\nexport type ReporterFilter = string | RegExp | ((reporterId: string) => boolean)\n\n/**\n * Formats a log entry.\n * Depends on the reporter, it can expect a different return type.\n * By default the return type is `any[]` which the `console` accepts.\n */\nexport type LogFormatter<T = any[]> = (entry: LogEntry) => T\n\n/**\n * Determines whether the entry should be written.\n */\nexport type LogFilter = (entry: LogEntry) => boolean\n\nexport type LogLevelEntry = { name: string, level: number }\n\nexport interface LogReporter<T = any> {\n readonly id: string,\n /**\n * Specifies the formatter to be used by the reporter.\n * Using this you can customize how the reporter writes the log entry.\n */\n readonly formatter: LogFormatter<T>,\n /**\n * Specifies a filter to determine should the log be written.\n */\n readonly filter?: LogFilter,\n /**\n * Indicate if this is a console reporter.\n * There is only one console reporter can be present in the system.\n */\n readonly isConsoleReporter?: boolean,\n write(entry: LogEntry): void\n}\n\nexport type LogReporterOptions<T = any> = {\n id?: string,\n /**\n * Specifies the formatter to be used by the reporter.\n * Using this you can customize how the reporter writes the log entry.\n */\n formatter?: LogFormatter<T>,\n /**\n * Specifies a filter to determine should the log be written.\n */\n filter?: LogFilter\n}\n\nexport type LogLevel = number\n\nexport interface ConsoleLike {\n debug(...args: any[]): void,\n info(...args: any[]): void,\n warn(...args: any[]): void,\n error(...args: any[]): void,\n}\n"]}
|