standard-log 12.1.1 → 13.0.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 +8 -8
- package/cjs/console.d.ts.map +1 -1
- package/cjs/console.js +8 -11
- package/cjs/console.js.map +1 -1
- package/cjs/errors.d.ts +1 -1
- package/cjs/errors.d.ts.map +1 -1
- package/cjs/errors.js.map +1 -1
- package/cjs/formatter.d.ts.map +1 -1
- package/cjs/formatter.js +5 -7
- package/cjs/formatter.js.map +1 -1
- package/cjs/index.d.ts +2 -2
- package/cjs/index.d.ts.map +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/log_levels.js +5 -5
- package/cjs/log_levels.js.map +1 -1
- package/cjs/log_store.js +2 -3
- package/cjs/log_store.js.map +1 -1
- package/cjs/logger.d.ts +1 -1
- package/cjs/logger.d.ts.map +1 -1
- package/cjs/logger.js +1 -2
- package/cjs/logger.js.map +1 -1
- package/cjs/memory.d.ts.map +1 -1
- package/cjs/memory.js +6 -9
- package/cjs/memory.js.map +1 -1
- package/cjs/platform.browser.d.ts.map +1 -1
- package/cjs/platform.d.ts.map +1 -1
- package/cjs/platform.js +2 -2
- package/cjs/platform.js.map +1 -1
- package/cjs/standard_log.d.ts +1 -1
- package/cjs/standard_log.d.ts.map +1 -1
- package/cjs/standard_log.js +5 -6
- package/cjs/standard_log.js.map +1 -1
- package/cjs/standard_log.testing.d.ts +1 -1
- package/cjs/standard_log.testing.js +1 -2
- package/cjs/standard_log.testing.js.map +1 -1
- package/cjs/testing/index.d.ts +2 -2
- package/cjs/testing/index.d.ts.map +1 -1
- package/cjs/testing/index.js.map +1 -1
- package/cjs/types.d.ts +1 -1
- package/cjs/types.d.ts.map +1 -1
- package/cjs/types.js.map +1 -1
- package/dist/standard-log.es5.js +1539 -1116
- 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 +202 -249
- 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/esm/console.d.ts.map +1 -1
- package/esm/console.js +7 -9
- package/esm/console.js.map +1 -1
- package/esm/errors.d.ts +1 -1
- package/esm/errors.d.ts.map +1 -1
- package/esm/errors.js.map +1 -1
- package/esm/formatter.d.ts.map +1 -1
- package/esm/formatter.js +1 -2
- package/esm/formatter.js.map +1 -1
- package/esm/index.d.ts +2 -2
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js.map +1 -1
- package/esm/log_levels.js +2 -2
- package/esm/log_levels.js.map +1 -1
- package/esm/logger.d.ts +1 -1
- package/esm/logger.d.ts.map +1 -1
- package/esm/logger.js.map +1 -1
- package/esm/memory.d.ts.map +1 -1
- package/esm/memory.js +3 -5
- package/esm/memory.js.map +1 -1
- package/esm/platform.browser.d.ts.map +1 -1
- package/esm/platform.d.ts.map +1 -1
- package/esm/platform.js +1 -1
- package/esm/platform.js.map +1 -1
- package/esm/standard_log.d.ts +1 -1
- package/esm/standard_log.d.ts.map +1 -1
- package/esm/standard_log.js.map +1 -1
- package/esm/standard_log.testing.d.ts +1 -1
- package/esm/standard_log.testing.js.map +1 -1
- package/esm/testing/index.d.ts +2 -2
- package/esm/testing/index.d.ts.map +1 -1
- package/esm/testing/index.js.map +1 -1
- package/esm/types.d.ts +1 -1
- package/esm/types.d.ts.map +1 -1
- package/esm/types.js.map +1 -1
- package/package.json +24 -36
- package/ts/console.ts +7 -8
- package/ts/errors.ts +5 -2
- package/ts/formatter.ts +1 -2
- package/ts/index.ts +3 -3
- package/ts/log_levels.ts +2 -2
- package/ts/logger.ts +14 -7
- package/ts/memory.ts +3 -5
- package/ts/platform.ts +1 -1
- package/ts/standard_log.testing.ts +1 -1
- package/ts/standard_log.ts +2 -2
- package/ts/testing/index.ts +3 -3
- package/ts/types.ts +1 -1
package/cjs/standard_log.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standard_log.js","sourceRoot":"","sources":["../ts/standard_log.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"standard_log.js","sourceRoot":"","sources":["../ts/standard_log.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAeA,8CAaC;AAID,4DAkDC;AAaD,oCAMC;AAOD,8BAEC;AAQD,oCAqBC;AA3ID,uCAA4C;AAC5C,iDAAqE;AACrE,+CAA8D;AAC9D,yCAA0C;AAC1C,6DAA2C;AAW3C,SAAgB,iBAAiB,CAChC,OAA+B;;IAE/B,IAAM,OAAO,GAAG,wBAAwB,CAAC,OAAO,CAAC,CAAA;IACjD,IAAI,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,0CAAE,IAAI,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,CAAC,EAAE,EAAL,CAAK,CAAC,EAAE,CAAC;QAC1C,IAAM,GAAG,GAAG,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,cAAc,CAAC,CAAA;QACzD,GAAG,CAAC,QAAQ,CACX,+JAA+J,CAC/J,CAAA;IACF,CAAC;IAED,IAAI,CAAC,yBAAG,CAAC,GAAG;QAAE,yBAAG,CAAC,GAAG,GAAG,OAAc,CAAA;IACtC,OAAO,OAAO,CAAC,WAAW,CAAA;AAC3B,CAAC;AAED,SAAS,IAAI,KAAI,CAAC;AAElB,SAAgB,wBAAwB,CACvC,OAA+B;;IAE/B,qCAAqC;IACrC,IAAM,KAAK,GAAG,IAAA,6BAAc,EAAC,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,yBAAS,CAAC,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA;IAC7E,IAAM,mBAAmB,GAAG,MAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,0CAAE,MAAM,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,CAAC,iBAAiB,EAApB,CAAoB,EAAE,G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G,CAAC,UAAU,GAAG,IAAI,CAAA;AACtB,CAAC","sourcesContent":["import { record, required } from 'type-plus'\nimport { DEFAULT_LOG_METHOD_NAMES, logLevels } from './log_levels.js'\nimport { createLogStore, type LogStore } from './log_store.js'\nimport { createLogger } from './logger.js'\nimport { ctx } from './standard_log.ctx.js'\nimport type {\n\tLogger,\n\tLoggerOptions,\n\tLogMethodNames,\n\tStandardLogInstance,\n\tStandardLogOptions\n} from './types.js'\n\nexport interface StandardLog<N extends string = LogMethodNames> extends Readonly<StandardLogInstance<N>> {}\n\nexport function createStandardLog<N extends string = LogMethodNames>(\n\toptions?: StandardLogOptions<N>\n): StandardLog<N> {\n\tconst closure = createStandardLogClosure(options)\n\tif (options?.reporters?.some(r => !r.id)) {\n\t\tconst log = closure.standardLog.getLogger('standard-log')\n\t\tlog.critical(\n\t\t\t`Detected reporter with empty id. This is not allowed as it will create problems with feature like 'getNonConsoleLogger()'. Please add an id to your reporter.`\n\t\t)\n\t}\n\n\tif (!ctx.gsl) ctx.gsl = closure as any\n\treturn closure.standardLog\n}\n\nfunction noop() {}\n\nexport function createStandardLogClosure<N extends string = LogMethodNames>(\n\toptions?: StandardLogOptions<N>\n): { store: LogStore; standardLog: StandardLog<N> } {\n\t// TODO reporter.id must not be empty\n\tconst store = createLogStore(required({ logLevel: logLevels.info }, options))\n\tconst nonConsoleReporters = options?.reporters?.filter(r => !r.isConsoleReporter).map(r => r.id) ?? []\n\tconst logMethods = DEFAULT_LOG_METHOD_NAMES.concat(Object.keys(options?.customLevels ?? {})).concat([\n\t\t'on',\n\t\t'count',\n\t\t'write'\n\t])\n\treturn {\n\t\tstore,\n\t\tstandardLog: {\n\t\t\tget logLevel() {\n\t\t\t\treturn store.logLevel\n\t\t\t},\n\n\t\t\ttoLogLevelName(level: number) {\n\t\t\t\treturn store.logLevelStore.getName(level)\n\t\t\t},\n\t\t\ttoLogLevel(name: string) {\n\t\t\t\treturn store.logLevelStore.getLevel(name)\n\t\t\t},\n\t\t\tgetLogger(id: string, options?: LoggerOptions) {\n\t\t\t\tif (store.loggers[id]) return store.loggers[id] as any\n\t\t\t\treturn (store.loggers[id] = createLogger(store, id, { ssf: this.getLogger, ...options }) as any)\n\t\t\t},\n\t\t\tgetNonConsoleLogger(id, options?) {\n\t\t\t\tif (store.nonConsoleLoggers[id]) return store.nonConsoleLoggers[id] as any\n\n\t\t\t\tif (store.loggers[id]) {\n\t\t\t\t\tconst log = this.getLogger('standard-log')\n\t\t\t\t\tlog.warn(`attempt to create a non-console logger with existing id ('${id}'), ignoring`)\n\t\t\t\t\treturn (store.nonConsoleLoggers[id] = createDummyLogger(logMethods))\n\t\t\t\t}\n\n\t\t\t\treturn (store.nonConsoleLoggers[id] =\n\t\t\t\t\tnonConsoleReporters.length === 0\n\t\t\t\t\t\t? createDummyLogger(logMethods)\n\t\t\t\t\t\t: createLogger(store, id, {\n\t\t\t\t\t\t\t\tssf: this.getNonConsoleLogger,\n\t\t\t\t\t\t\t\t...options,\n\t\t\t\t\t\t\t\twriteTo(reporterId) {\n\t\t\t\t\t\t\t\t\treturn nonConsoleReporters.indexOf(reporterId) >= 0\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}))\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction createDummyLogger(logMethods: string[]) {\n\treturn logMethods.reduce((p, m) => {\n\t\tp[m] = noop\n\t\treturn p\n\t}, record()) as Logger\n}\n\n/**\n * Suppress logging within the code block.\n */\nexport function suppressLogs<R>(block: () => R, log: Logger, ...logs: Logger[]): R\nexport function suppressLogs<R>(block: () => R, ...logs: Logger[]): R {\n\tconst origLevels = logs.map(l => l.level)\n\tlogs.forEach(l => (l.level = logLevels.none))\n\tconst result = block()\n\tlogs.forEach((l, i) => (l.level = origLevels[i]))\n\treturn result\n}\n\nexport type GetLogger<N extends string = LogMethodNames> = (\n\tid: string,\n\toptions?: LoggerOptions\n) => Logger<LogMethodNames | N>\n\nexport function getLogger<N extends string = LogMethodNames>(id: string, options?: LoggerOptions) {\n\treturn getGlobalSL<N>().getLogger(id, options)\n}\n\nfunction getGlobalSL<N extends string = LogMethodNames>(): StandardLogInstance<N> {\n\tif (!ctx.gsl) ctx.gsl = createStandardLogClosure()\n\n\treturn ctx.gsl!.standardLog as StandardLogInstance<N>\n}\n\nexport function configGlobal(options: Omit<StandardLogOptions, 'customLevels'>) {\n\tif (ctx.configured) {\n\t\tconst log = ctx.gsl!.standardLog.getLogger('standard-log')\n\t\tlog.warn(\n\t\t\t'configGlobal() is being called more than once. Please make sure this is expected. Application should use `createStandardLog()` most of the time.'\n\t\t)\n\t}\n\n\tif (ctx.gsl) {\n\t\tif (options.logLevel) {\n\t\t\tctx.gsl.store.logLevel = options.logLevel\n\t\t}\n\t\tif (options.reporters) {\n\t\t\tconst reporters = ctx.gsl.store.reporters\n\t\t\treporters.length = 0\n\t\t\treporters.push(...options.reporters)\n\t\t}\n\t} else {\n\t\tctx.gsl = createStandardLogClosure(options)\n\t}\n\tctx.configured = true\n}\n"]}
|
|
@@ -3,7 +3,7 @@ import { type StandardLog } from './standard_log.js';
|
|
|
3
3
|
import type { LogMethodNames, StandardLogOptions } from './types.js';
|
|
4
4
|
export type StandardLogForTestOptions<N extends string = LogMethodNames> = StandardLogOptions<N> & {
|
|
5
5
|
/**
|
|
6
|
-
* Send the logs to console
|
|
6
|
+
* Send the logs to console for easy debugging.
|
|
7
7
|
*
|
|
8
8
|
* @default false
|
|
9
9
|
*/
|
|
@@ -11,7 +11,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.createStandardLogForTest =
|
|
14
|
+
exports.createStandardLogForTest = createStandardLogForTest;
|
|
15
15
|
var console_js_1 = require("./console.js");
|
|
16
16
|
var log_levels_js_1 = require("./log_levels.js");
|
|
17
17
|
var memory_js_1 = require("./memory.js");
|
|
@@ -34,5 +34,4 @@ function createStandardLogForTest(options) {
|
|
|
34
34
|
var closure = (0, standard_log_js_1.createStandardLogClosure)(options);
|
|
35
35
|
return __assign(__assign({}, closure.standardLog), { reporter: reporter });
|
|
36
36
|
}
|
|
37
|
-
exports.createStandardLogForTest = createStandardLogForTest;
|
|
38
37
|
//# sourceMappingURL=standard_log.testing.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standard_log.testing.js","sourceRoot":"","sources":["../ts/standard_log.testing.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"standard_log.testing.js","sourceRoot":"","sources":["../ts/standard_log.testing.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAmBA,4DAmBC;AAtCD,2CAAuD;AACvD,iDAA2C;AAC3C,yCAA6E;AAC7E,qDAA8E;AAgB9E,SAAgB,wBAAwB,CACvC,OAA0C;;IAA1C,wBAAA,EAAA,YAA0C;IAE1C,OAAO,CAAC,QAAQ,GAAG,MAAA,OAAO,CAAC,QAAQ,mCAAI,yBAAS,CAAC,KAAK,CAAA;IACtD,OAAO,CAAC,SAAS,GAAG,MAAA,OAAO,CAAC,SAAS,mCAAI,EAAE,CAAA;IAE3C,IAAI,OAAO,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,iBAAiB,EAAnB,CAAmB,CAAC,EAAE,CAAC;QAC1E,8BAA8B;QAC9B,oCAAoC;QACpC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,IAAA,qCAAwB,GAAE,CAAC,CAAA;IACnD,CAAC;IAED,IAAM,gBAAgB,GAAG,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,EAAE,KAAK,QAAQ,EAAjB,CAAiB,CAAsB,CAAA;IAC5F,IAAM,QAAQ,GAAG,gBAAgB,aAAhB,gBAAgB,cAAhB,gBAAgB,GAAI,IAAA,mCAAuB,GAAE,CAAA;IAC9D,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACvB,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;IACjC,CAAC;IACD,IAAM,OAAO,GAAG,IAAA,0CAAwB,EAAI,OAAO,CAAC,CAAA;IACpD,6BAAY,OAAO,CAAC,WAAW,KAAE,QAAQ,UAAA,IAAE;AAC5C,CAAC","sourcesContent":["import { createConsoleLogReporter } from './console.js'\nimport { logLevels } from './log_levels.js'\nimport { createMemoryLogReporter, type MemoryLogReporter } from './memory.js'\nimport { createStandardLogClosure, type StandardLog } from './standard_log.js'\nimport type { LogMethodNames, StandardLogOptions } from './types.js'\n\nexport type StandardLogForTestOptions<N extends string = LogMethodNames> = StandardLogOptions<N> & {\n\t/**\n\t * Send the logs to console for easy debugging.\n\t *\n\t * @default false\n\t */\n\temitLog?: boolean\n}\n\nexport type StandardLogForTest<N extends string = LogMethodNames> = StandardLog<N> & {\n\treporter: MemoryLogReporter\n}\n\nexport function createStandardLogForTest<N extends string = LogMethodNames>(\n\toptions: StandardLogForTestOptions<N> = {}\n): StandardLogForTest<N> {\n\toptions.logLevel = options.logLevel ?? logLevels.debug\n\toptions.reporters = options.reporters ?? []\n\n\tif (options.emitLog && !options.reporters.some(r => r.isConsoleReporter)) {\n\t\t// this is used for debugging,\n\t\t// so no need to use color reporter.\n\t\toptions.reporters.push(createConsoleLogReporter())\n\t}\n\n\tconst existingReporter = options.reporters.find(r => r.id === 'memory') as MemoryLogReporter\n\tconst reporter = existingReporter ?? createMemoryLogReporter()\n\tif (!existingReporter) {\n\t\toptions.reporters.push(reporter)\n\t}\n\tconst closure = createStandardLogClosure<N>(options)\n\treturn { ...closure.standardLog, reporter }\n}\n"]}
|
package/cjs/testing/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { createStandardLogForTest, type
|
|
1
|
+
export type { MemoryLogReporter } from '../memory.js';
|
|
2
|
+
export { createStandardLogForTest, type StandardLogForTest, type StandardLogForTestOptions } from '../standard_log.testing.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../ts/testing/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../ts/testing/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AACrD,OAAO,EACN,wBAAwB,EACxB,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,MAAM,4BAA4B,CAAA"}
|
package/cjs/testing/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../ts/testing/index.ts"],"names":[],"mappings":";;;AACA,sEAImC;AAHlC,mIAAA,wBAAwB,OAAA","sourcesContent":["export {
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../ts/testing/index.ts"],"names":[],"mappings":";;;AACA,sEAImC;AAHlC,mIAAA,wBAAwB,OAAA","sourcesContent":["export type { MemoryLogReporter } from '../memory.js'\nexport {\n\tcreateStandardLogForTest,\n\ttype StandardLogForTest,\n\ttype StandardLogForTestOptions\n} from '../standard_log.testing.js'\n"]}
|
package/cjs/types.d.ts
CHANGED
|
@@ -52,7 +52,7 @@ export type LogEntry = {
|
|
|
52
52
|
timestamp: Date;
|
|
53
53
|
};
|
|
54
54
|
export type LogMethod = (...args: any[]) => void;
|
|
55
|
-
export type LogFunction = (log: LogMethod, logLevel: number) => string | void;
|
|
55
|
+
export type LogFunction = (log: LogMethod, logLevel: number) => string | undefined | void;
|
|
56
56
|
export type ReporterFilter = string | RegExp | ((reporterId: string) => boolean);
|
|
57
57
|
export interface StandardLogInstance<N extends string = LogMethodNames> {
|
|
58
58
|
/**
|
package/cjs/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
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ts/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { StackTraceMeta } from '@just-func/types'\n\nexport type StandardLogOptions<CustomLevelNames extends string = LogMethodNames> = {\n\t/**\n\t * A map of custom log levels.\n\t *\n\t * Each logger created will have a method for each custom level.\n\t *\n\t * ```ts\n\t * import { createStandardLog } from 'standard-log'\n\t *\n\t * const sl = createStandardLog({ customLevels: { foo: 100 } })\n\t * const logger = sl.getLogger('my-logger')\n\t *\n\t * logger.foo('Hello world!') // 2020-01-01T00:00:00.000Z my-logger (FOO) Hello world!\n\t * ```\n\t */\n\tcustomLevels?: Record<CustomLevelNames, number>\n\tlogLevel?: number\n\treporters?: LogReporter[]\n}\n\nexport interface LoggerOptions extends StackTraceMeta {\n\tlevel?: number\n\twriteTo?: LogReporter | ReporterFilter\n}\n\nexport type Logger<N extends string = LogMethodNames> = {\n\treadonly id: string\n\t/**\n\t * Logger local log level.\n\t */\n\tlevel?: number\n\t/**\n\t * Logs with an increment counter.\n\t * This is useful during debugging to check for steps executed.\n\t */\n\tcount(...args: any[]): void\n\ton(level: number | N, logFunction: LogFunction): void\n\t/**\n\t * Write custom log entries.\n\t */\n\twrite(entry: LogEntry): void\n} & { [k in N]: LogMethod }\n\n/**\n * Names of the standard log methods.\n */\nexport type LogMethodNames =\n\t| 'emergency'\n\t| 'alert'\n\t| 'critical'\n\t| 'error'\n\t| 'warn'\n\t| 'notice'\n\t| 'info'\n\t| 'debug'\n\t| 'trace'\n\t| 'planck'\n\nexport type LogEntry = {\n\tid: string\n\tlevel: number\n\t// args instead of messages because it is `any[]` instead of `string[]`\n\targs: any[]\n\ttimestamp: Date\n}\n\nexport type LogMethod = (...args: any[]) => void\n\nexport type LogFunction = (log: LogMethod, logLevel: number) => string | void\n\nexport type ReporterFilter = string | RegExp | ((reporterId: string) => boolean)\n\nexport interface StandardLogInstance<N extends string = LogMethodNames> {\n\t/**\n\t * The current log level.\n\t */\n\tlogLevel: number\n\t/**\n\t * Convert log level number to log level name.\n\t */\n\ttoLogLevelName(level: number): string\n\t/**\n\t * Convert log level name to log level number.\n\t */\n\ttoLogLevel(name: N): number\n\t/**\n\t * Get a logger instance with the specified id.\n\t *\n\t * ```ts\n\t * const logger = getLogger('my-logger')\n\t *\n\t * logger.info('Hello world!') // 2020-01-01T00:00:00.000Z my-logger (INFO) Hello world!\n\t * ```\n\t */\n\tgetLogger(id: string, options?: LoggerOptions): Logger<N | LogMethodNames>\n\t/**\n\t * Get a non-console logger instance with the specified id.\n\t *\n\t * The resulting logger will only send to the reporters that are not console reporters.\n\t *\n\t * ```ts\n\t * const logger = getNonConsoleLogger('my-logger')\n\t *\n\t * logger.info('Hello world!') // will not send to any console reporter\n\t * ```\n\t */\n\tgetNonConsoleLogger(id: string, options?: LoggerOptions): Logger<N | LogMethodNames>\n}\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\treadonly id: string\n\t/**\n\t * Specifies the formatter to be used by the reporter.\n\t * Using this you can customize how the reporter writes the log entry.\n\t */\n\treadonly formatter: LogFormatter<T>\n\t/**\n\t * Specifies a filter to determine should the log be written.\n\t */\n\treadonly filter?: LogFilter\n\t/**\n\t * Indicates if this is a console reporter.\n\t * There is only one console reporter can be present in the system.\n\t */\n\treadonly isConsoleReporter?: boolean\n\twrite(entry: LogEntry): void\n}\n\nexport type LogReporterOptions<T = any> = {\n\tid?: string\n\t/**\n\t * Specifies the formatter to be used by the reporter.\n\t * Using this you can customize how the reporter writes the log entry.\n\t */\n\tformatter?: LogFormatter<T>\n\t/**\n\t * Specifies a filter to determine should the log be written.\n\t */\n\tfilter?: LogFilter\n}\n\nexport type LogLevel = number\n\nexport interface ConsoleLike {\n\tdebug(...args: any[]): void\n\tinfo(...args: any[]): void\n\twarn(...args: any[]): void\n\terror(...args: any[]): void\n}\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../ts/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { StackTraceMeta } from '@just-func/types'\n\nexport type StandardLogOptions<CustomLevelNames extends string = LogMethodNames> = {\n\t/**\n\t * A map of custom log levels.\n\t *\n\t * Each logger created will have a method for each custom level.\n\t *\n\t * ```ts\n\t * import { createStandardLog } from 'standard-log'\n\t *\n\t * const sl = createStandardLog({ customLevels: { foo: 100 } })\n\t * const logger = sl.getLogger('my-logger')\n\t *\n\t * logger.foo('Hello world!') // 2020-01-01T00:00:00.000Z my-logger (FOO) Hello world!\n\t * ```\n\t */\n\tcustomLevels?: Record<CustomLevelNames, number>\n\tlogLevel?: number\n\treporters?: LogReporter[]\n}\n\nexport interface LoggerOptions extends StackTraceMeta {\n\tlevel?: number\n\twriteTo?: LogReporter | ReporterFilter\n}\n\nexport type Logger<N extends string = LogMethodNames> = {\n\treadonly id: string\n\t/**\n\t * Logger local log level.\n\t */\n\tlevel?: number\n\t/**\n\t * Logs with an increment counter.\n\t * This is useful during debugging to check for steps executed.\n\t */\n\tcount(...args: any[]): void\n\ton(level: number | N, logFunction: LogFunction): void\n\t/**\n\t * Write custom log entries.\n\t */\n\twrite(entry: LogEntry): void\n} & { [k in N]: LogMethod }\n\n/**\n * Names of the standard log methods.\n */\nexport type LogMethodNames =\n\t| 'emergency'\n\t| 'alert'\n\t| 'critical'\n\t| 'error'\n\t| 'warn'\n\t| 'notice'\n\t| 'info'\n\t| 'debug'\n\t| 'trace'\n\t| 'planck'\n\nexport type LogEntry = {\n\tid: string\n\tlevel: number\n\t// args instead of messages because it is `any[]` instead of `string[]`\n\targs: any[]\n\ttimestamp: Date\n}\n\nexport type LogMethod = (...args: any[]) => void\n\nexport type LogFunction = (log: LogMethod, logLevel: number) => string | undefined | void\n\nexport type ReporterFilter = string | RegExp | ((reporterId: string) => boolean)\n\nexport interface StandardLogInstance<N extends string = LogMethodNames> {\n\t/**\n\t * The current log level.\n\t */\n\tlogLevel: number\n\t/**\n\t * Convert log level number to log level name.\n\t */\n\ttoLogLevelName(level: number): string\n\t/**\n\t * Convert log level name to log level number.\n\t */\n\ttoLogLevel(name: N): number\n\t/**\n\t * Get a logger instance with the specified id.\n\t *\n\t * ```ts\n\t * const logger = getLogger('my-logger')\n\t *\n\t * logger.info('Hello world!') // 2020-01-01T00:00:00.000Z my-logger (INFO) Hello world!\n\t * ```\n\t */\n\tgetLogger(id: string, options?: LoggerOptions): Logger<N | LogMethodNames>\n\t/**\n\t * Get a non-console logger instance with the specified id.\n\t *\n\t * The resulting logger will only send to the reporters that are not console reporters.\n\t *\n\t * ```ts\n\t * const logger = getNonConsoleLogger('my-logger')\n\t *\n\t * logger.info('Hello world!') // will not send to any console reporter\n\t * ```\n\t */\n\tgetNonConsoleLogger(id: string, options?: LoggerOptions): Logger<N | LogMethodNames>\n}\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\treadonly id: string\n\t/**\n\t * Specifies the formatter to be used by the reporter.\n\t * Using this you can customize how the reporter writes the log entry.\n\t */\n\treadonly formatter: LogFormatter<T>\n\t/**\n\t * Specifies a filter to determine should the log be written.\n\t */\n\treadonly filter?: LogFilter\n\t/**\n\t * Indicates if this is a console reporter.\n\t * There is only one console reporter can be present in the system.\n\t */\n\treadonly isConsoleReporter?: boolean\n\twrite(entry: LogEntry): void\n}\n\nexport type LogReporterOptions<T = any> = {\n\tid?: string\n\t/**\n\t * Specifies the formatter to be used by the reporter.\n\t * Using this you can customize how the reporter writes the log entry.\n\t */\n\tformatter?: LogFormatter<T>\n\t/**\n\t * Specifies a filter to determine should the log be written.\n\t */\n\tfilter?: LogFilter\n}\n\nexport type LogLevel = number\n\nexport interface ConsoleLike {\n\tdebug(...args: any[]): void\n\tinfo(...args: any[]): void\n\twarn(...args: any[]): void\n\terror(...args: any[]): void\n}\n"]}
|