@spinajs/log 2.0.481 → 2.0.484
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 +744 -0
- package/lib/cjs/archive/LogArchiveService.d.ts +75 -0
- package/lib/cjs/archive/LogArchiveService.d.ts.map +1 -0
- package/lib/cjs/archive/LogArchiveService.js +189 -0
- package/lib/cjs/archive/LogArchiveService.js.map +1 -0
- package/lib/cjs/archive/archive-strategy.d.ts +32 -0
- package/lib/cjs/archive/archive-strategy.d.ts.map +1 -0
- package/lib/cjs/archive/archive-strategy.js +43 -0
- package/lib/cjs/archive/archive-strategy.js.map +1 -0
- package/lib/cjs/archive/context.d.ts +50 -0
- package/lib/cjs/archive/context.d.ts.map +1 -0
- package/lib/cjs/archive/context.js +3 -0
- package/lib/cjs/archive/context.js.map +1 -0
- package/lib/cjs/archive/index.d.ts +10 -0
- package/lib/cjs/archive/index.d.ts.map +1 -0
- package/lib/cjs/archive/index.js +26 -0
- package/lib/cjs/archive/index.js.map +1 -0
- package/lib/cjs/archive/retention-strategy.d.ts +26 -0
- package/lib/cjs/archive/retention-strategy.d.ts.map +1 -0
- package/lib/cjs/archive/retention-strategy.js +42 -0
- package/lib/cjs/archive/retention-strategy.js.map +1 -0
- package/lib/cjs/archive/strategies/AgeLogRetentionStrategy.d.ts +10 -0
- package/lib/cjs/archive/strategies/AgeLogRetentionStrategy.d.ts.map +1 -0
- package/lib/cjs/archive/strategies/AgeLogRetentionStrategy.js +46 -0
- package/lib/cjs/archive/strategies/AgeLogRetentionStrategy.js.map +1 -0
- package/lib/cjs/archive/strategies/CountLogRetentionStrategy.d.ts +10 -0
- package/lib/cjs/archive/strategies/CountLogRetentionStrategy.d.ts.map +1 -0
- package/lib/cjs/archive/strategies/CountLogRetentionStrategy.js +42 -0
- package/lib/cjs/archive/strategies/CountLogRetentionStrategy.js.map +1 -0
- package/lib/cjs/archive/strategies/CronLogArchiveStrategy.d.ts +15 -0
- package/lib/cjs/archive/strategies/CronLogArchiveStrategy.d.ts.map +1 -0
- package/lib/cjs/archive/strategies/CronLogArchiveStrategy.js +52 -0
- package/lib/cjs/archive/strategies/CronLogArchiveStrategy.js.map +1 -0
- package/lib/cjs/archive/strategies/SizeLogArchiveStrategy.d.ts +18 -0
- package/lib/cjs/archive/strategies/SizeLogArchiveStrategy.d.ts.map +1 -0
- package/lib/cjs/archive/strategies/SizeLogArchiveStrategy.js +63 -0
- package/lib/cjs/archive/strategies/SizeLogArchiveStrategy.js.map +1 -0
- package/lib/cjs/archive/strategies/util.d.ts +28 -0
- package/lib/cjs/archive/strategies/util.d.ts.map +1 -0
- package/lib/cjs/archive/strategies/util.js +59 -0
- package/lib/cjs/archive/strategies/util.js.map +1 -0
- package/lib/cjs/bootstrap.d.ts.map +1 -1
- package/lib/cjs/bootstrap.js +24 -1
- package/lib/cjs/bootstrap.js.map +1 -1
- package/lib/cjs/callsite.d.ts +26 -0
- package/lib/cjs/callsite.d.ts.map +1 -0
- package/lib/cjs/callsite.js +60 -0
- package/lib/cjs/callsite.js.map +1 -0
- package/lib/cjs/config/log.d.ts +96 -0
- package/lib/cjs/config/log.d.ts.map +1 -0
- package/lib/cjs/config/log.js +75 -0
- package/lib/cjs/config/log.js.map +1 -0
- package/lib/cjs/context.browser.d.ts +46 -0
- package/lib/cjs/context.browser.d.ts.map +1 -0
- package/lib/cjs/context.browser.js +85 -0
- package/lib/cjs/context.browser.js.map +1 -0
- package/lib/cjs/context.d.ts +61 -0
- package/lib/cjs/context.d.ts.map +1 -0
- package/lib/cjs/context.js +92 -0
- package/lib/cjs/context.js.map +1 -0
- package/lib/cjs/filters/LevelFilter.d.ts +24 -0
- package/lib/cjs/filters/LevelFilter.d.ts.map +1 -0
- package/lib/cjs/filters/LevelFilter.js +39 -0
- package/lib/cjs/filters/LevelFilter.js.map +1 -0
- package/lib/cjs/filters/MatchFilter.d.ts +30 -0
- package/lib/cjs/filters/MatchFilter.d.ts.map +1 -0
- package/lib/cjs/filters/MatchFilter.js +65 -0
- package/lib/cjs/filters/MatchFilter.js.map +1 -0
- package/lib/cjs/filters/RateLimitFilter.d.ts +37 -0
- package/lib/cjs/filters/RateLimitFilter.d.ts.map +1 -0
- package/lib/cjs/filters/RateLimitFilter.js +70 -0
- package/lib/cjs/filters/RateLimitFilter.js.map +1 -0
- package/lib/cjs/filters/index.d.ts +4 -0
- package/lib/cjs/filters/index.d.ts.map +1 -0
- package/lib/cjs/filters/index.js +20 -0
- package/lib/cjs/filters/index.js.map +1 -0
- package/lib/cjs/index.browser.d.ts +14 -0
- package/lib/cjs/index.browser.d.ts.map +1 -0
- package/lib/cjs/index.browser.js +46 -0
- package/lib/cjs/index.browser.js.map +1 -0
- package/lib/cjs/index.d.ts +8 -0
- package/lib/cjs/index.d.ts.map +1 -1
- package/lib/cjs/index.js +8 -0
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/log.d.ts +60 -1
- package/lib/cjs/log.d.ts.map +1 -1
- package/lib/cjs/log.js +294 -32
- package/lib/cjs/log.js.map +1 -1
- package/lib/cjs/perf/LogMetricSink.d.ts +55 -0
- package/lib/cjs/perf/LogMetricSink.d.ts.map +1 -0
- package/lib/cjs/perf/LogMetricSink.js +154 -0
- package/lib/cjs/perf/LogMetricSink.js.map +1 -0
- package/lib/cjs/perf/measure.d.ts +9 -0
- package/lib/cjs/perf/measure.d.ts.map +1 -0
- package/lib/cjs/perf/measure.js +21 -0
- package/lib/cjs/perf/measure.js.map +1 -0
- package/lib/cjs/perf.d.ts +9 -0
- package/lib/cjs/perf.d.ts.map +1 -0
- package/lib/cjs/perf.js +18 -0
- package/lib/cjs/perf.js.map +1 -0
- package/lib/cjs/schemas/log.configuration.d.ts +151 -18
- package/lib/cjs/schemas/log.configuration.d.ts.map +1 -1
- package/lib/cjs/schemas/log.configuration.js +154 -21
- package/lib/cjs/schemas/log.configuration.js.map +1 -1
- package/lib/cjs/targets/BrowserConsoleTarget.d.ts +48 -0
- package/lib/cjs/targets/BrowserConsoleTarget.d.ts.map +1 -0
- package/lib/cjs/targets/BrowserConsoleTarget.js +48 -0
- package/lib/cjs/targets/BrowserConsoleTarget.js.map +1 -0
- package/lib/cjs/targets/ColoredConsoleTarget.d.ts.map +1 -1
- package/lib/cjs/targets/ColoredConsoleTarget.js +21 -12
- package/lib/cjs/targets/ColoredConsoleTarget.js.map +1 -1
- package/lib/cjs/targets/FileTarget.d.ts +96 -20
- package/lib/cjs/targets/FileTarget.d.ts.map +1 -1
- package/lib/cjs/targets/FileTarget.js +188 -225
- package/lib/cjs/targets/FileTarget.js.map +1 -1
- package/lib/cjs/targets/JsonFileTarget.d.ts +19 -0
- package/lib/cjs/targets/JsonFileTarget.d.ts.map +1 -0
- package/lib/cjs/targets/JsonFileTarget.js +44 -0
- package/lib/cjs/targets/JsonFileTarget.js.map +1 -0
- package/lib/cjs/targets/JsonTarget.d.ts +27 -0
- package/lib/cjs/targets/JsonTarget.d.ts.map +1 -0
- package/lib/cjs/targets/JsonTarget.js +46 -0
- package/lib/cjs/targets/JsonTarget.js.map +1 -0
- package/lib/cjs/targets/MemoryTarget.d.ts +33 -0
- package/lib/cjs/targets/MemoryTarget.d.ts.map +1 -0
- package/lib/cjs/targets/MemoryTarget.js +63 -0
- package/lib/cjs/targets/MemoryTarget.js.map +1 -0
- package/lib/cjs/targets/index.d.ts +7 -0
- package/lib/cjs/targets/index.d.ts.map +1 -1
- package/lib/cjs/targets/index.js +7 -0
- package/lib/cjs/targets/index.js.map +1 -1
- package/lib/cjs/targets/wrappers/AutoFlushTarget.d.ts +37 -0
- package/lib/cjs/targets/wrappers/AutoFlushTarget.d.ts.map +1 -0
- package/lib/cjs/targets/wrappers/AutoFlushTarget.js +48 -0
- package/lib/cjs/targets/wrappers/AutoFlushTarget.js.map +1 -0
- package/lib/cjs/targets/wrappers/FallbackGroupTarget.d.ts +45 -0
- package/lib/cjs/targets/wrappers/FallbackGroupTarget.d.ts.map +1 -0
- package/lib/cjs/targets/wrappers/FallbackGroupTarget.js +94 -0
- package/lib/cjs/targets/wrappers/FallbackGroupTarget.js.map +1 -0
- package/lib/cjs/targets/wrappers/RetryingTarget.d.ts +44 -0
- package/lib/cjs/targets/wrappers/RetryingTarget.d.ts.map +1 -0
- package/lib/cjs/targets/wrappers/RetryingTarget.js +61 -0
- package/lib/cjs/targets/wrappers/RetryingTarget.js.map +1 -0
- package/lib/cjs/targets/wrappers/SplitGroupTarget.d.ts +30 -0
- package/lib/cjs/targets/wrappers/SplitGroupTarget.d.ts.map +1 -0
- package/lib/cjs/targets/wrappers/SplitGroupTarget.js +52 -0
- package/lib/cjs/targets/wrappers/SplitGroupTarget.js.map +1 -0
- package/lib/cjs/traceparent.d.ts +63 -0
- package/lib/cjs/traceparent.d.ts.map +1 -0
- package/lib/cjs/traceparent.js +107 -0
- package/lib/cjs/traceparent.js.map +1 -0
- package/lib/mjs/archive/LogArchiveService.d.ts +75 -0
- package/lib/mjs/archive/LogArchiveService.d.ts.map +1 -0
- package/lib/mjs/archive/LogArchiveService.js +186 -0
- package/lib/mjs/archive/LogArchiveService.js.map +1 -0
- package/lib/mjs/archive/archive-strategy.d.ts +32 -0
- package/lib/mjs/archive/archive-strategy.d.ts.map +1 -0
- package/lib/mjs/archive/archive-strategy.js +39 -0
- package/lib/mjs/archive/archive-strategy.js.map +1 -0
- package/lib/mjs/archive/context.d.ts +50 -0
- package/lib/mjs/archive/context.d.ts.map +1 -0
- package/lib/mjs/archive/context.js +2 -0
- package/lib/mjs/archive/context.js.map +1 -0
- package/lib/mjs/archive/index.d.ts +10 -0
- package/lib/mjs/archive/index.d.ts.map +1 -0
- package/lib/mjs/archive/index.js +10 -0
- package/lib/mjs/archive/index.js.map +1 -0
- package/lib/mjs/archive/retention-strategy.d.ts +26 -0
- package/lib/mjs/archive/retention-strategy.d.ts.map +1 -0
- package/lib/mjs/archive/retention-strategy.js +38 -0
- package/lib/mjs/archive/retention-strategy.js.map +1 -0
- package/lib/mjs/archive/strategies/AgeLogRetentionStrategy.d.ts +10 -0
- package/lib/mjs/archive/strategies/AgeLogRetentionStrategy.d.ts.map +1 -0
- package/lib/mjs/archive/strategies/AgeLogRetentionStrategy.js +43 -0
- package/lib/mjs/archive/strategies/AgeLogRetentionStrategy.js.map +1 -0
- package/lib/mjs/archive/strategies/CountLogRetentionStrategy.d.ts +10 -0
- package/lib/mjs/archive/strategies/CountLogRetentionStrategy.d.ts.map +1 -0
- package/lib/mjs/archive/strategies/CountLogRetentionStrategy.js +39 -0
- package/lib/mjs/archive/strategies/CountLogRetentionStrategy.js.map +1 -0
- package/lib/mjs/archive/strategies/CronLogArchiveStrategy.d.ts +15 -0
- package/lib/mjs/archive/strategies/CronLogArchiveStrategy.d.ts.map +1 -0
- package/lib/mjs/archive/strategies/CronLogArchiveStrategy.js +49 -0
- package/lib/mjs/archive/strategies/CronLogArchiveStrategy.js.map +1 -0
- package/lib/mjs/archive/strategies/SizeLogArchiveStrategy.d.ts +18 -0
- package/lib/mjs/archive/strategies/SizeLogArchiveStrategy.d.ts.map +1 -0
- package/lib/mjs/archive/strategies/SizeLogArchiveStrategy.js +60 -0
- package/lib/mjs/archive/strategies/SizeLogArchiveStrategy.js.map +1 -0
- package/lib/mjs/archive/strategies/util.d.ts +28 -0
- package/lib/mjs/archive/strategies/util.d.ts.map +1 -0
- package/lib/mjs/archive/strategies/util.js +54 -0
- package/lib/mjs/archive/strategies/util.js.map +1 -0
- package/lib/mjs/bootstrap.d.ts.map +1 -1
- package/lib/mjs/bootstrap.js +25 -2
- package/lib/mjs/bootstrap.js.map +1 -1
- package/lib/mjs/callsite.d.ts +26 -0
- package/lib/mjs/callsite.d.ts.map +1 -0
- package/lib/mjs/callsite.js +57 -0
- package/lib/mjs/callsite.js.map +1 -0
- package/lib/mjs/config/log.d.ts +96 -0
- package/lib/mjs/config/log.d.ts.map +1 -0
- package/lib/mjs/config/log.js +72 -0
- package/lib/mjs/config/log.js.map +1 -0
- package/lib/mjs/context.browser.d.ts +46 -0
- package/lib/mjs/context.browser.d.ts.map +1 -0
- package/lib/mjs/context.browser.js +81 -0
- package/lib/mjs/context.browser.js.map +1 -0
- package/lib/mjs/context.d.ts +61 -0
- package/lib/mjs/context.d.ts.map +1 -0
- package/lib/mjs/context.js +88 -0
- package/lib/mjs/context.js.map +1 -0
- package/lib/mjs/filters/LevelFilter.d.ts +24 -0
- package/lib/mjs/filters/LevelFilter.d.ts.map +1 -0
- package/lib/mjs/filters/LevelFilter.js +36 -0
- package/lib/mjs/filters/LevelFilter.js.map +1 -0
- package/lib/mjs/filters/MatchFilter.d.ts +30 -0
- package/lib/mjs/filters/MatchFilter.d.ts.map +1 -0
- package/lib/mjs/filters/MatchFilter.js +62 -0
- package/lib/mjs/filters/MatchFilter.js.map +1 -0
- package/lib/mjs/filters/RateLimitFilter.d.ts +37 -0
- package/lib/mjs/filters/RateLimitFilter.d.ts.map +1 -0
- package/lib/mjs/filters/RateLimitFilter.js +67 -0
- package/lib/mjs/filters/RateLimitFilter.js.map +1 -0
- package/lib/mjs/filters/index.d.ts +4 -0
- package/lib/mjs/filters/index.d.ts.map +1 -0
- package/lib/mjs/filters/index.js +4 -0
- package/lib/mjs/filters/index.js.map +1 -0
- package/lib/mjs/index.browser.d.ts +14 -0
- package/lib/mjs/index.browser.d.ts.map +1 -0
- package/lib/mjs/index.browser.js +30 -0
- package/lib/mjs/index.browser.js.map +1 -0
- package/lib/mjs/index.d.ts +8 -0
- package/lib/mjs/index.d.ts.map +1 -1
- package/lib/mjs/index.js +8 -0
- package/lib/mjs/index.js.map +1 -1
- package/lib/mjs/log.d.ts +60 -1
- package/lib/mjs/log.d.ts.map +1 -1
- package/lib/mjs/log.js +295 -33
- package/lib/mjs/log.js.map +1 -1
- package/lib/mjs/perf/LogMetricSink.d.ts +55 -0
- package/lib/mjs/perf/LogMetricSink.d.ts.map +1 -0
- package/lib/mjs/perf/LogMetricSink.js +151 -0
- package/lib/mjs/perf/LogMetricSink.js.map +1 -0
- package/lib/mjs/perf/measure.d.ts +9 -0
- package/lib/mjs/perf/measure.d.ts.map +1 -0
- package/lib/mjs/perf/measure.js +18 -0
- package/lib/mjs/perf/measure.js.map +1 -0
- package/lib/mjs/perf.d.ts +9 -0
- package/lib/mjs/perf.d.ts.map +1 -0
- package/lib/mjs/perf.js +15 -0
- package/lib/mjs/perf.js.map +1 -0
- package/lib/mjs/schemas/log.configuration.d.ts +151 -18
- package/lib/mjs/schemas/log.configuration.d.ts.map +1 -1
- package/lib/mjs/schemas/log.configuration.js +154 -21
- package/lib/mjs/schemas/log.configuration.js.map +1 -1
- package/lib/mjs/targets/BrowserConsoleTarget.d.ts +48 -0
- package/lib/mjs/targets/BrowserConsoleTarget.d.ts.map +1 -0
- package/lib/mjs/targets/BrowserConsoleTarget.js +45 -0
- package/lib/mjs/targets/BrowserConsoleTarget.js.map +1 -0
- package/lib/mjs/targets/ColoredConsoleTarget.d.ts.map +1 -1
- package/lib/mjs/targets/ColoredConsoleTarget.js +21 -9
- package/lib/mjs/targets/ColoredConsoleTarget.js.map +1 -1
- package/lib/mjs/targets/FileTarget.d.ts +96 -20
- package/lib/mjs/targets/FileTarget.d.ts.map +1 -1
- package/lib/mjs/targets/FileTarget.js +191 -192
- package/lib/mjs/targets/FileTarget.js.map +1 -1
- package/lib/mjs/targets/JsonFileTarget.d.ts +19 -0
- package/lib/mjs/targets/JsonFileTarget.d.ts.map +1 -0
- package/lib/mjs/targets/JsonFileTarget.js +41 -0
- package/lib/mjs/targets/JsonFileTarget.js.map +1 -0
- package/lib/mjs/targets/JsonTarget.d.ts +27 -0
- package/lib/mjs/targets/JsonTarget.d.ts.map +1 -0
- package/lib/mjs/targets/JsonTarget.js +43 -0
- package/lib/mjs/targets/JsonTarget.js.map +1 -0
- package/lib/mjs/targets/MemoryTarget.d.ts +33 -0
- package/lib/mjs/targets/MemoryTarget.d.ts.map +1 -0
- package/lib/mjs/targets/MemoryTarget.js +60 -0
- package/lib/mjs/targets/MemoryTarget.js.map +1 -0
- package/lib/mjs/targets/index.d.ts +7 -0
- package/lib/mjs/targets/index.d.ts.map +1 -1
- package/lib/mjs/targets/index.js +7 -0
- package/lib/mjs/targets/index.js.map +1 -1
- package/lib/mjs/targets/wrappers/AutoFlushTarget.d.ts +37 -0
- package/lib/mjs/targets/wrappers/AutoFlushTarget.d.ts.map +1 -0
- package/lib/mjs/targets/wrappers/AutoFlushTarget.js +45 -0
- package/lib/mjs/targets/wrappers/AutoFlushTarget.js.map +1 -0
- package/lib/mjs/targets/wrappers/FallbackGroupTarget.d.ts +45 -0
- package/lib/mjs/targets/wrappers/FallbackGroupTarget.d.ts.map +1 -0
- package/lib/mjs/targets/wrappers/FallbackGroupTarget.js +91 -0
- package/lib/mjs/targets/wrappers/FallbackGroupTarget.js.map +1 -0
- package/lib/mjs/targets/wrappers/RetryingTarget.d.ts +44 -0
- package/lib/mjs/targets/wrappers/RetryingTarget.d.ts.map +1 -0
- package/lib/mjs/targets/wrappers/RetryingTarget.js +58 -0
- package/lib/mjs/targets/wrappers/RetryingTarget.js.map +1 -0
- package/lib/mjs/targets/wrappers/SplitGroupTarget.d.ts +30 -0
- package/lib/mjs/targets/wrappers/SplitGroupTarget.d.ts.map +1 -0
- package/lib/mjs/targets/wrappers/SplitGroupTarget.js +49 -0
- package/lib/mjs/targets/wrappers/SplitGroupTarget.js.map +1 -0
- package/lib/mjs/traceparent.d.ts +63 -0
- package/lib/mjs/traceparent.d.ts.map +1 -0
- package/lib/mjs/traceparent.js +100 -0
- package/lib/mjs/traceparent.js.map +1 -0
- package/lib/tsconfig.cjs.tsbuildinfo +1 -1
- package/lib/tsconfig.mjs.tsbuildinfo +1 -1
- package/package.json +26 -15
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.LogMetricSink = void 0;
|
|
13
|
+
const di_1 = require("@spinajs/di");
|
|
14
|
+
const configuration_1 = require("@spinajs/configuration");
|
|
15
|
+
const log_common_1 = require("@spinajs/log-common");
|
|
16
|
+
/**
|
|
17
|
+
* Default {@link PerfSink}: renders perf measurements as structured log entries
|
|
18
|
+
* through the normal targets/filters/rules pipeline, on a dedicated `perf`
|
|
19
|
+
* logger. Spans over their per-name threshold log at `warn`; under-threshold
|
|
20
|
+
* spans log at `trace` ( kept for on-demand visibility, cheaply gated out when
|
|
21
|
+
* trace routing is off ). Rollups log one `info` line.
|
|
22
|
+
*/
|
|
23
|
+
let LogMetricSink = class LogMetricSink extends log_common_1.PerfSink {
|
|
24
|
+
logsUnderThreshold(name) {
|
|
25
|
+
const setting = this.LogUnderThreshold ?? false;
|
|
26
|
+
return Array.isArray(setting) ? setting.includes(name) : setting === true;
|
|
27
|
+
}
|
|
28
|
+
thresholdFor(name) {
|
|
29
|
+
const t = this.Thresholds ?? {};
|
|
30
|
+
return t[name] ?? t.default ?? 0;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Renders the statement into the message. The `sql` field is already attached to
|
|
34
|
+
* the entry, but most console layouts print only `${message}`, so
|
|
35
|
+
* "Slow orm.query: 251.1ms" on its own gives no way to tell WHICH query it was.
|
|
36
|
+
*
|
|
37
|
+
* Bindings are deliberately left out of the message - they routinely hold
|
|
38
|
+
* passwords, tokens and personal data. They stay in the structured fields, where a
|
|
39
|
+
* target can opt into them.
|
|
40
|
+
*/
|
|
41
|
+
sqlSuffix(fields) {
|
|
42
|
+
const sql = fields.sql;
|
|
43
|
+
if (typeof sql !== "string" || sql.trim().length === 0) {
|
|
44
|
+
return "";
|
|
45
|
+
}
|
|
46
|
+
const flattened = sql.replace(/\s+/g, " ").trim();
|
|
47
|
+
const max = this.SqlMaxLength ?? 2000;
|
|
48
|
+
const clipped = flattened.length > max ? `${flattened.slice(0, max)}...` : flattened;
|
|
49
|
+
return ` - ${clipped}`;
|
|
50
|
+
}
|
|
51
|
+
collect(metric) {
|
|
52
|
+
if (!this.Enabled)
|
|
53
|
+
return;
|
|
54
|
+
if (metric.kind === "span") {
|
|
55
|
+
const dur = metric.durationMs ?? 0;
|
|
56
|
+
// `metric.fields` already carries `error` for a failed span ( set by the
|
|
57
|
+
// facade ), so the log's error serializer runs when this object is logged.
|
|
58
|
+
const fields = { durationMs: dur, ...(metric.labels ?? {}), ...(metric.fields ?? {}) };
|
|
59
|
+
if (metric.error !== undefined) {
|
|
60
|
+
this.emitAt("error", `${metric.name} failed after ${dur.toFixed(1)}ms${this.sqlSuffix(fields)}`, fields);
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
const threshold = this.thresholdFor(metric.name);
|
|
64
|
+
const slow = threshold > 0 && dur >= threshold;
|
|
65
|
+
if (!slow && !this.logsUnderThreshold(metric.name)) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
const level = slow ? this.OverLevel : this.UnderLevel;
|
|
69
|
+
this.emitAt(level, `${slow ? "Slow " : ""}${metric.name}: ${dur.toFixed(1)}ms${this.sqlSuffix(fields)}`, fields);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
if (this.LogCounters && (metric.kind === "counter" || metric.kind === "value")) {
|
|
73
|
+
this.emitAt("trace", `${metric.name}=${metric.value}`, { ...(metric.labels ?? {}) });
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
onScopeEnd(rollup) {
|
|
77
|
+
if (!this.Enabled)
|
|
78
|
+
return;
|
|
79
|
+
const parts = Object.entries(rollup.byName)
|
|
80
|
+
.map(([n, e]) => `${n} x${e.count} ${e.totalMs.toFixed(0)}ms`)
|
|
81
|
+
.join(", ");
|
|
82
|
+
const tag = rollup.requestId ? ` [${rollup.requestId}]` : "";
|
|
83
|
+
this.emitAt("info", `perf rollup${tag}: ${parts || "no measurements"}`, {
|
|
84
|
+
requestId: rollup.requestId,
|
|
85
|
+
totalMs: rollup.totalMs,
|
|
86
|
+
byName: rollup.byName,
|
|
87
|
+
...(rollup.labels ?? {}),
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Emit through the log's MERGING-OBJECT form ( fields object FIRST, then the
|
|
92
|
+
* message string ) so the structured variables ( durationMs, labels, sql,
|
|
93
|
+
* error ) are attached to the entry. The `@spinajs/log` API treats a trailing
|
|
94
|
+
* object as a printf argument, so passing fields last would silently drop
|
|
95
|
+
* them. See the `warn(fields, message?)` overload on the `Log` base class.
|
|
96
|
+
*/
|
|
97
|
+
emitAt(level, message, fields) {
|
|
98
|
+
switch (level) {
|
|
99
|
+
case "error":
|
|
100
|
+
this.Log.error(fields, message);
|
|
101
|
+
break;
|
|
102
|
+
case "warn":
|
|
103
|
+
this.Log.warn(fields, message);
|
|
104
|
+
break;
|
|
105
|
+
case "info":
|
|
106
|
+
this.Log.info(fields, message);
|
|
107
|
+
break;
|
|
108
|
+
case "debug":
|
|
109
|
+
this.Log.debug(fields, message);
|
|
110
|
+
break;
|
|
111
|
+
default:
|
|
112
|
+
this.Log.trace(fields, message);
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
exports.LogMetricSink = LogMetricSink;
|
|
118
|
+
__decorate([
|
|
119
|
+
(0, log_common_1.Logger)("perf"),
|
|
120
|
+
__metadata("design:type", log_common_1.Log)
|
|
121
|
+
], LogMetricSink.prototype, "Log", void 0);
|
|
122
|
+
__decorate([
|
|
123
|
+
(0, configuration_1.Config)("logger.perf.enabled", { defaultValue: true }),
|
|
124
|
+
__metadata("design:type", Boolean)
|
|
125
|
+
], LogMetricSink.prototype, "Enabled", void 0);
|
|
126
|
+
__decorate([
|
|
127
|
+
(0, configuration_1.Config)("logger.perf.thresholds", { defaultValue: { "orm.query": 200, "http.request": 1000, default: 0 } }),
|
|
128
|
+
__metadata("design:type", Object)
|
|
129
|
+
], LogMetricSink.prototype, "Thresholds", void 0);
|
|
130
|
+
__decorate([
|
|
131
|
+
(0, configuration_1.Config)("logger.perf.overThresholdLevel", { defaultValue: "warn" }),
|
|
132
|
+
__metadata("design:type", String)
|
|
133
|
+
], LogMetricSink.prototype, "OverLevel", void 0);
|
|
134
|
+
__decorate([
|
|
135
|
+
(0, configuration_1.Config)("logger.perf.underThresholdLevel", { defaultValue: "trace" }),
|
|
136
|
+
__metadata("design:type", String)
|
|
137
|
+
], LogMetricSink.prototype, "UnderLevel", void 0);
|
|
138
|
+
__decorate([
|
|
139
|
+
(0, configuration_1.Config)("logger.perf.logCounters", { defaultValue: false }),
|
|
140
|
+
__metadata("design:type", Boolean)
|
|
141
|
+
], LogMetricSink.prototype, "LogCounters", void 0);
|
|
142
|
+
__decorate([
|
|
143
|
+
(0, configuration_1.Config)("logger.perf.sqlMaxLength", { defaultValue: 2000 }),
|
|
144
|
+
__metadata("design:type", Number)
|
|
145
|
+
], LogMetricSink.prototype, "SqlMaxLength", void 0);
|
|
146
|
+
__decorate([
|
|
147
|
+
(0, configuration_1.Config)("logger.perf.logUnderThreshold", { defaultValue: false }),
|
|
148
|
+
__metadata("design:type", Object)
|
|
149
|
+
], LogMetricSink.prototype, "LogUnderThreshold", void 0);
|
|
150
|
+
exports.LogMetricSink = LogMetricSink = __decorate([
|
|
151
|
+
(0, di_1.Singleton)(),
|
|
152
|
+
(0, di_1.Injectable)(log_common_1.PerfSink)
|
|
153
|
+
], LogMetricSink);
|
|
154
|
+
//# sourceMappingURL=LogMetricSink.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogMetricSink.js","sourceRoot":"","sources":["../../../src/perf/LogMetricSink.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oCAAoD;AACpD,0DAAgD;AAChD,oDAAsF;AAEtF;;;;;;GAMG;AAGI,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,qBAAQ;IAuCjC,kBAAkB,CAAC,IAAY;QACrC,MAAM,OAAO,GAAG,IAAI,CAAC,iBAAiB,IAAI,KAAK,CAAC;QAChD,OAAO,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,KAAK,IAAI,CAAC;IAC5E,CAAC;IAEO,YAAY,CAAC,IAAY;QAC/B,MAAM,CAAC,GAAG,IAAI,CAAC,UAAU,IAAI,EAAE,CAAC;QAChC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC;IACnC,CAAC;IAED;;;;;;;;OAQG;IACK,SAAS,CAAC,MAA+B;QAC/C,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC;QAEvB,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACvD,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,MAAM,SAAS,GAAG,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;QAClD,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC;QACtC,MAAM,OAAO,GAAG,SAAS,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,EA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AAE,CAAC;;kDAC3B;AAGtB;IADT,IAAA,sBAAM,EAAC,0BAA0B,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;;mDAC3B;AAiBtB;IADT,IAAA,sBAAM,EAAC,+BAA+B,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;;wDAChB;wBArCtC,aAAa;IAFzB,IAAA,cAAS,GAAE;IACX,IAAA,eAAU,EAAC,qBAAQ,CAAC;GACR,aAAa,CA+IzB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IMeasureOpts } from "@spinajs/log-common";
|
|
2
|
+
/**
|
|
3
|
+
* Method decorator that times the wrapped method via {@link Perf.measure}. Name
|
|
4
|
+
* defaults to `${ClassName}.${method}`. Works for sync and async methods ( the
|
|
5
|
+
* facade awaits a returned thenable ). Uses the same legacy-decorator signature
|
|
6
|
+
* as the rest of the framework ( `experimentalDecorators` ).
|
|
7
|
+
*/
|
|
8
|
+
export declare function Measure(name?: string, opts?: IMeasureOpts): (target: object, propertyKey: string | symbol, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
9
|
+
//# sourceMappingURL=measure.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"measure.d.ts","sourceRoot":"","sources":["../../../src/perf/measure.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEzD;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,YAAY,IACvC,QAAQ,MAAM,EAAE,aAAa,MAAM,GAAG,MAAM,EAAE,YAAY,kBAAkB,KAAG,kBAAkB,CAQnH"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Measure = Measure;
|
|
4
|
+
const log_common_1 = require("@spinajs/log-common");
|
|
5
|
+
/**
|
|
6
|
+
* Method decorator that times the wrapped method via {@link Perf.measure}. Name
|
|
7
|
+
* defaults to `${ClassName}.${method}`. Works for sync and async methods ( the
|
|
8
|
+
* facade awaits a returned thenable ). Uses the same legacy-decorator signature
|
|
9
|
+
* as the rest of the framework ( `experimentalDecorators` ).
|
|
10
|
+
*/
|
|
11
|
+
function Measure(name, opts) {
|
|
12
|
+
return function (target, propertyKey, descriptor) {
|
|
13
|
+
const original = descriptor.value;
|
|
14
|
+
const metricName = name ?? `${target.constructor.name}.${String(propertyKey)}`;
|
|
15
|
+
descriptor.value = function (...args) {
|
|
16
|
+
return log_common_1.Perf.measure(metricName, () => original.apply(this, args), opts);
|
|
17
|
+
};
|
|
18
|
+
return descriptor;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=measure.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"measure.js","sourceRoot":"","sources":["../../../src/perf/measure.ts"],"names":[],"mappings":";;AAQA,0BASC;AAjBD,oDAAyD;AAEzD;;;;;GAKG;AACH,SAAgB,OAAO,CAAC,IAAa,EAAE,IAAmB;IACxD,OAAO,UAAU,MAAc,EAAE,WAA4B,EAAE,UAA8B;QAC3F,MAAM,QAAQ,GAAG,UAAU,CAAC,KAAwC,CAAC;QACrE,MAAM,UAAU,GAAG,IAAI,IAAI,GAAI,MAA4C,CAAC,WAAW,CAAC,IAAI,IAAI,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC;QACtH,UAAU,CAAC,KAAK,GAAG,UAAyB,GAAG,IAAe;YAC5D,OAAO,iBAAI,CAAC,OAAO,CAAC,UAAU,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC;QAC1E,CAAC,CAAC;QACF,OAAO,UAAU,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Install the per-request perf-scope backend for the node runtime. Reads the
|
|
3
|
+
* `perf` accumulator off the ambient async store ( which IS `req.storage` when
|
|
4
|
+
* http runs an action, so the scope created by the http PerfRollup middleware
|
|
5
|
+
* and mutated during the action is one and the same object ). Called from
|
|
6
|
+
* {@link LogBotstrapper.bootstrap}.
|
|
7
|
+
*/
|
|
8
|
+
export declare function wirePerfScope(): void;
|
|
9
|
+
//# sourceMappingURL=perf.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"perf.d.ts","sourceRoot":"","sources":["../../src/perf.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,wBAAgB,aAAa,IAAI,IAAI,CAIpC"}
|
package/lib/cjs/perf.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.wirePerfScope = wirePerfScope;
|
|
4
|
+
const log_common_1 = require("@spinajs/log-common");
|
|
5
|
+
const context_js_1 = require("./context.js");
|
|
6
|
+
/**
|
|
7
|
+
* Install the per-request perf-scope backend for the node runtime. Reads the
|
|
8
|
+
* `perf` accumulator off the ambient async store ( which IS `req.storage` when
|
|
9
|
+
* http runs an action, so the scope created by the http PerfRollup middleware
|
|
10
|
+
* and mutated during the action is one and the same object ). Called from
|
|
11
|
+
* {@link LogBotstrapper.bootstrap}.
|
|
12
|
+
*/
|
|
13
|
+
function wirePerfScope() {
|
|
14
|
+
(0, log_common_1.setPerfScopeBackend)({
|
|
15
|
+
get: () => context_js_1.LogContext.active().perf ?? null,
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=perf.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"perf.js","sourceRoot":"","sources":["../../src/perf.ts"],"names":[],"mappings":";;AAUA,sCAIC;AAdD,oDAAsE;AACtE,6CAA0C;AAE1C;;;;;;GAMG;AACH,SAAgB,aAAa;IAC3B,IAAA,gCAAmB,EAAC;QAClB,GAAG,EAAE,GAAG,EAAE,CAAE,uBAAU,CAAC,MAAM,EAAE,CAAC,IAA+B,IAAI,IAAI;KACxE,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -24,29 +24,153 @@ declare const CONFIGURATION_SCHEMA: {
|
|
|
24
24
|
enabled: {
|
|
25
25
|
type: string;
|
|
26
26
|
};
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
};
|
|
30
|
-
archivePath: {
|
|
31
|
-
type: string;
|
|
32
|
-
};
|
|
33
|
-
maxSize: {
|
|
34
|
-
type: string;
|
|
35
|
-
minimum: number;
|
|
36
|
-
};
|
|
37
|
-
compress: {
|
|
38
|
-
type: string;
|
|
39
|
-
};
|
|
40
|
-
rotate: {
|
|
27
|
+
filters: {
|
|
28
|
+
description: string;
|
|
41
29
|
type: string;
|
|
30
|
+
items: {
|
|
31
|
+
type: string;
|
|
32
|
+
properties: {
|
|
33
|
+
type: {
|
|
34
|
+
description: string;
|
|
35
|
+
type: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
required: string[];
|
|
39
|
+
};
|
|
42
40
|
};
|
|
43
|
-
|
|
41
|
+
options: {
|
|
44
42
|
type: string;
|
|
45
|
-
|
|
43
|
+
properties: {
|
|
44
|
+
path: {
|
|
45
|
+
description: string;
|
|
46
|
+
type: string;
|
|
47
|
+
};
|
|
48
|
+
archivePath: {
|
|
49
|
+
description: string;
|
|
50
|
+
type: string;
|
|
51
|
+
};
|
|
52
|
+
fs: {
|
|
53
|
+
description: string;
|
|
54
|
+
type: string;
|
|
55
|
+
};
|
|
56
|
+
archiveFs: {
|
|
57
|
+
description: string;
|
|
58
|
+
type: string;
|
|
59
|
+
};
|
|
60
|
+
archiveStrategy: {
|
|
61
|
+
description: string;
|
|
62
|
+
type: string;
|
|
63
|
+
};
|
|
64
|
+
retentionStrategies: {
|
|
65
|
+
description: string;
|
|
66
|
+
type: string;
|
|
67
|
+
items: {
|
|
68
|
+
type: string;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
maxSize: {
|
|
72
|
+
description: string;
|
|
73
|
+
type: string;
|
|
74
|
+
minimum: number;
|
|
75
|
+
};
|
|
76
|
+
compress: {
|
|
77
|
+
description: string;
|
|
78
|
+
type: string;
|
|
79
|
+
};
|
|
80
|
+
rotate: {
|
|
81
|
+
description: string;
|
|
82
|
+
type: string;
|
|
83
|
+
};
|
|
84
|
+
maxBufferSize: {
|
|
85
|
+
description: string;
|
|
86
|
+
type: string;
|
|
87
|
+
minimum: number;
|
|
88
|
+
};
|
|
89
|
+
maxQueueSize: {
|
|
90
|
+
description: string;
|
|
91
|
+
type: string;
|
|
92
|
+
minimum: number;
|
|
93
|
+
};
|
|
94
|
+
maxArchiveFiles: {
|
|
95
|
+
description: string;
|
|
96
|
+
type: string;
|
|
97
|
+
minimum: number;
|
|
98
|
+
};
|
|
99
|
+
maxAge: {
|
|
100
|
+
description: string;
|
|
101
|
+
type: string;
|
|
102
|
+
minimum: number;
|
|
103
|
+
};
|
|
104
|
+
archiveInterval: {
|
|
105
|
+
description: string;
|
|
106
|
+
type: string;
|
|
107
|
+
minimum: number;
|
|
108
|
+
};
|
|
109
|
+
flushInterval: {
|
|
110
|
+
description: string;
|
|
111
|
+
type: string;
|
|
112
|
+
minimum: number;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
required: string[];
|
|
46
116
|
};
|
|
47
|
-
|
|
117
|
+
};
|
|
118
|
+
required: string[];
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
file: {
|
|
122
|
+
description: string;
|
|
123
|
+
type: string;
|
|
124
|
+
};
|
|
125
|
+
perf: {
|
|
126
|
+
description: string;
|
|
127
|
+
type: string;
|
|
128
|
+
properties: {
|
|
129
|
+
enabled: {
|
|
130
|
+
type: string;
|
|
131
|
+
};
|
|
132
|
+
thresholds: {
|
|
133
|
+
description: string;
|
|
134
|
+
type: string;
|
|
135
|
+
};
|
|
136
|
+
overThresholdLevel: {
|
|
137
|
+
type: string;
|
|
138
|
+
enum: string[];
|
|
139
|
+
};
|
|
140
|
+
underThresholdLevel: {
|
|
141
|
+
type: string;
|
|
142
|
+
enum: string[];
|
|
143
|
+
};
|
|
144
|
+
logCounters: {
|
|
145
|
+
type: string;
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
whenRepeated: {
|
|
150
|
+
description: string;
|
|
151
|
+
type: string;
|
|
152
|
+
properties: {
|
|
153
|
+
timeout: {
|
|
154
|
+
description: string;
|
|
155
|
+
type: string;
|
|
156
|
+
minimum: number;
|
|
157
|
+
};
|
|
158
|
+
maxKeys: {
|
|
159
|
+
description: string;
|
|
160
|
+
type: string;
|
|
161
|
+
minimum: number;
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
filters: {
|
|
166
|
+
description: string;
|
|
167
|
+
type: string;
|
|
168
|
+
items: {
|
|
169
|
+
type: string;
|
|
170
|
+
properties: {
|
|
171
|
+
type: {
|
|
172
|
+
description: string;
|
|
48
173
|
type: string;
|
|
49
|
-
minimum: number;
|
|
50
174
|
};
|
|
51
175
|
};
|
|
52
176
|
required: string[];
|
|
@@ -67,6 +191,11 @@ declare const CONFIGURATION_SCHEMA: {
|
|
|
67
191
|
type: string;
|
|
68
192
|
enum: string[];
|
|
69
193
|
};
|
|
194
|
+
maxLevel: {
|
|
195
|
+
description: string;
|
|
196
|
+
type: string;
|
|
197
|
+
enum: string[];
|
|
198
|
+
};
|
|
70
199
|
target: {
|
|
71
200
|
oneOf: ({
|
|
72
201
|
type: string;
|
|
@@ -78,6 +207,10 @@ declare const CONFIGURATION_SCHEMA: {
|
|
|
78
207
|
};
|
|
79
208
|
})[];
|
|
80
209
|
};
|
|
210
|
+
final: {
|
|
211
|
+
description: string;
|
|
212
|
+
type: string;
|
|
213
|
+
};
|
|
81
214
|
};
|
|
82
215
|
required: string[];
|
|
83
216
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.configuration.d.ts","sourceRoot":"","sources":["../../../src/schemas/log.configuration.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"log.configuration.d.ts","sourceRoot":"","sources":["../../../src/schemas/log.configuration.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0PzB,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -26,32 +26,147 @@ const CONFIGURATION_SCHEMA = {
|
|
|
26
26
|
enabled: {
|
|
27
27
|
type: "boolean",
|
|
28
28
|
},
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
29
|
+
filters: {
|
|
30
|
+
description: "Per-target filter pipeline, applied only when writing to THIS target ( after the logger-level filters ). Each item is { type, ...opts } where `type` is the DI name of a LogFilter. Any returning null drops the entry for this target only.",
|
|
31
|
+
type: "array",
|
|
32
|
+
items: {
|
|
33
|
+
type: "object",
|
|
34
|
+
properties: {
|
|
35
|
+
type: {
|
|
36
|
+
description: "DI string name of the registered LogFilter.",
|
|
37
|
+
type: "string",
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
required: ["type"],
|
|
41
|
+
},
|
|
38
42
|
},
|
|
39
|
-
|
|
40
|
-
|
|
43
|
+
// FileTarget options ( nested under `options` )
|
|
44
|
+
options: {
|
|
45
|
+
type: "object",
|
|
46
|
+
properties: {
|
|
47
|
+
path: {
|
|
48
|
+
description: "Active log path, relative to the `fs` provider base path. Variables allowed.",
|
|
49
|
+
type: "string",
|
|
50
|
+
},
|
|
51
|
+
archivePath: {
|
|
52
|
+
description: "Archive directory, relative to the `archiveFs` provider base path. Variables allowed.",
|
|
53
|
+
type: "string",
|
|
54
|
+
},
|
|
55
|
+
fs: {
|
|
56
|
+
description: "Registered @spinajs/fs provider for the active log. Defaults to 'fs-log-default'.",
|
|
57
|
+
type: "string",
|
|
58
|
+
},
|
|
59
|
+
archiveFs: {
|
|
60
|
+
description: "Registered @spinajs/fs provider archives are moved to. Defaults to `fs`.",
|
|
61
|
+
type: "string",
|
|
62
|
+
},
|
|
63
|
+
archiveStrategy: {
|
|
64
|
+
description: "LogArchiveStrategy class name deciding WHEN to rotate. Default 'SizeLogArchiveStrategy'.",
|
|
65
|
+
type: "string",
|
|
66
|
+
},
|
|
67
|
+
retentionStrategies: {
|
|
68
|
+
description: "LogRetentionStrategy class names applied in order after rotation. Default ['CountLogRetentionStrategy'].",
|
|
69
|
+
type: "array",
|
|
70
|
+
items: {
|
|
71
|
+
type: "string",
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
maxSize: {
|
|
75
|
+
description: "Max active log size in bytes before rotation.",
|
|
76
|
+
type: "integer",
|
|
77
|
+
minimum: 1,
|
|
78
|
+
},
|
|
79
|
+
compress: {
|
|
80
|
+
description: "Zip the archived file when moved to the archive.",
|
|
81
|
+
type: "boolean",
|
|
82
|
+
},
|
|
83
|
+
rotate: {
|
|
84
|
+
description: "Cron expression for CronLogArchiveStrategy ( 6-field with seconds ).",
|
|
85
|
+
type: "string",
|
|
86
|
+
},
|
|
87
|
+
maxBufferSize: {
|
|
88
|
+
description: "Max buffered messages before a flush.",
|
|
89
|
+
type: "integer",
|
|
90
|
+
minimum: 1,
|
|
91
|
+
},
|
|
92
|
+
maxQueueSize: {
|
|
93
|
+
description: "Hard cap on buffered messages; oldest are dropped past this so a down sink cannot OOM.",
|
|
94
|
+
type: "integer",
|
|
95
|
+
minimum: 1,
|
|
96
|
+
},
|
|
97
|
+
maxArchiveFiles: {
|
|
98
|
+
description: "How many archives to keep ( CountLogRetentionStrategy ). Oldest are deleted.",
|
|
99
|
+
type: "integer",
|
|
100
|
+
minimum: 1,
|
|
101
|
+
},
|
|
102
|
+
maxAge: {
|
|
103
|
+
description: "Max archive age in seconds ( AgeLogRetentionStrategy ).",
|
|
104
|
+
type: "integer",
|
|
105
|
+
minimum: 1,
|
|
106
|
+
},
|
|
107
|
+
archiveInterval: {
|
|
108
|
+
description: "Interval in seconds SizeLogArchiveStrategy checks the active log size.",
|
|
109
|
+
type: "integer",
|
|
110
|
+
minimum: 1,
|
|
111
|
+
},
|
|
112
|
+
flushInterval: {
|
|
113
|
+
description: "Periodic flush tick in milliseconds for a partially filled buffer.",
|
|
114
|
+
type: "integer",
|
|
115
|
+
minimum: 1,
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
required: ["path"],
|
|
41
119
|
},
|
|
42
|
-
|
|
120
|
+
},
|
|
121
|
+
required: ["name", "type"],
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
file: {
|
|
125
|
+
description: "Default FileTarget options ( buffer / rotation / retention tunables ) merged UNDER every file target's own `options`. Shipped by @spinajs/log ( see logger.file defaults ) and overridable by user config.",
|
|
126
|
+
type: "object",
|
|
127
|
+
},
|
|
128
|
+
perf: {
|
|
129
|
+
description: "Performance-instrumentation ( Perf facade ) options for the default LogMetricSink.",
|
|
130
|
+
type: "object",
|
|
131
|
+
properties: {
|
|
132
|
+
enabled: { type: "boolean" },
|
|
133
|
+
thresholds: {
|
|
134
|
+
description: "Per-metric-name slow threshold in ms. A name not present falls back to `default`; 0 means never slow.",
|
|
135
|
+
type: "object",
|
|
136
|
+
},
|
|
137
|
+
overThresholdLevel: { type: "string", enum: ["trace", "debug", "info", "warn", "error"] },
|
|
138
|
+
underThresholdLevel: { type: "string", enum: ["trace", "debug", "info", "warn", "error"] },
|
|
139
|
+
logCounters: { type: "boolean" },
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
whenRepeated: {
|
|
143
|
+
description: "Opt-in dedup filter. Collapses identical repeated log entries within a timeout window into one, emitting a (xN) count when logging resumes. Off when absent; global for now.",
|
|
144
|
+
type: "object",
|
|
145
|
+
properties: {
|
|
146
|
+
timeout: {
|
|
147
|
+
description: "Suppression window in SECONDS. Identical entries within this window are collapsed. Default 10.",
|
|
148
|
+
type: "integer",
|
|
149
|
+
minimum: 1,
|
|
150
|
+
},
|
|
151
|
+
maxKeys: {
|
|
152
|
+
description: "Hard cap on tracked keys; the map self-prunes ( expired first, then oldest ) so memory stays bounded. Default 1024.",
|
|
153
|
+
type: "integer",
|
|
154
|
+
minimum: 1,
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
filters: {
|
|
159
|
+
description: "Composable per-logger filter pipeline. Each item is { type, ...opts } where `type` is the DI name of a LogFilter ( eg. LevelFilter, MatchFilter, RateLimitFilter, WhenRepeatedFilter ). Filters run in order in write(); any returning null drops the entry.",
|
|
160
|
+
type: "array",
|
|
161
|
+
items: {
|
|
162
|
+
type: "object",
|
|
163
|
+
properties: {
|
|
164
|
+
type: {
|
|
165
|
+
description: "DI string name of the registered LogFilter.",
|
|
43
166
|
type: "string",
|
|
44
167
|
},
|
|
45
|
-
maxArchiveFiles: {
|
|
46
|
-
type: "integer",
|
|
47
|
-
minimum: 1,
|
|
48
|
-
},
|
|
49
|
-
bufferSize: {
|
|
50
|
-
type: "integer",
|
|
51
|
-
minimum: 1000,
|
|
52
|
-
},
|
|
53
168
|
},
|
|
54
|
-
required: ["
|
|
169
|
+
required: ["type"],
|
|
55
170
|
},
|
|
56
171
|
},
|
|
57
172
|
rules: {
|
|
@@ -78,6 +193,20 @@ const CONFIGURATION_SCHEMA = {
|
|
|
78
193
|
"success",
|
|
79
194
|
],
|
|
80
195
|
},
|
|
196
|
+
maxLevel: {
|
|
197
|
+
description: "Optional INCLUSIVE upper bound of the level window this rule routes. With `level` as the lower bound, only entries in [level, maxLevel] are routed. Defaults to the highest level ( security ).",
|
|
198
|
+
type: "string",
|
|
199
|
+
enum: [
|
|
200
|
+
"trace",
|
|
201
|
+
"debug",
|
|
202
|
+
"warn",
|
|
203
|
+
"info",
|
|
204
|
+
"error",
|
|
205
|
+
"fatal",
|
|
206
|
+
"security",
|
|
207
|
+
"success",
|
|
208
|
+
],
|
|
209
|
+
},
|
|
81
210
|
target: {
|
|
82
211
|
oneOf: [
|
|
83
212
|
{
|
|
@@ -91,6 +220,10 @@ const CONFIGURATION_SCHEMA = {
|
|
|
91
220
|
},
|
|
92
221
|
],
|
|
93
222
|
},
|
|
223
|
+
final: {
|
|
224
|
+
description: "Stop evaluating further rules for a logger once this matching rule is applied ( NLog-style ). Earlier matched rules and this one still apply.",
|
|
225
|
+
type: "boolean",
|
|
226
|
+
},
|
|
94
227
|
},
|
|
95
228
|
required: ["name", "level", "target"],
|
|
96
229
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.configuration.js","sourceRoot":"","sources":["../../../src/schemas/log.configuration.ts"],"names":[],"mappings":";;AAAA,MAAM,oBAAoB,GAAG;IAC3B,GAAG,EAAE,uCAAuC;IAC5C,oBAAoB,EAAE,QAAQ;IAC9B,WAAW,EAAE,wCAAwC;IACrD,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,OAAO,EAAE;YACP,WAAW,EACT,wEAAwE;YAC1E,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,CAAC;YACX,WAAW,EAAE,IAAI;YACjB,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,MAAM,EAAE;wBACN,IAAI,EAAE,QAAQ;qBACf;oBACD,IAAI,EAAE;wBACJ,IAAI,EAAE,QAAQ;qBACf;oBACD,IAAI,EAAE;wBACJ,IAAI,EAAE,QAAQ;qBACf;oBACD,OAAO,EAAE;wBACP,IAAI,EAAE,SAAS;qBAChB;oBACD,IAAI,EAAE;
|
|
1
|
+
{"version":3,"file":"log.configuration.js","sourceRoot":"","sources":["../../../src/schemas/log.configuration.ts"],"names":[],"mappings":";;AAAA,MAAM,oBAAoB,GAAG;IAC3B,GAAG,EAAE,uCAAuC;IAC5C,oBAAoB,EAAE,QAAQ;IAC9B,WAAW,EAAE,wCAAwC;IACrD,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,OAAO,EAAE;YACP,WAAW,EACT,wEAAwE;YAC1E,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,CAAC;YACX,WAAW,EAAE,IAAI;YACjB,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,MAAM,EAAE;wBACN,IAAI,EAAE,QAAQ;qBACf;oBACD,IAAI,EAAE;wBACJ,IAAI,EAAE,QAAQ;qBACf;oBACD,IAAI,EAAE;wBACJ,IAAI,EAAE,QAAQ;qBACf;oBACD,OAAO,EAAE;wBACP,IAAI,EAAE,SAAS;qBAChB;oBACD,OAAO,EAAE;wBACP,WAAW,EACT,8OAA8O;wBAChP,IAAI,EAAE,OAAO;wBACb,KAAK,EAAE;4BACL,IAAI,EAAE,QAAQ;4BACd,UAAU,EAAE;gCACV,IAAI,EAAE;oCACJ,WAAW,EAAE,6CAA6C;oCAC1D,IAAI,EAAE,QAAQ;iCACf;6BACF;4BACD,QAAQ,EAAE,CAAC,MAAM,CAAC;yBACnB;qBACF;oBACD,gDAAgD;oBAChD,OAAO,EAAE;wBACP,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,IAAI,EAAE;gCACJ,WAAW,EACT,8EAA8E;gCAChF,IAAI,EAAE,QAAQ;6BACf;4BACD,WAAW,EAAE;gCACX,WAAW,EACT,uFAAuF;gCACzF,IAAI,EAAE,QAAQ;6BACf;4BACD,EAAE,EAAE;gCACF,WAAW,EACT,mFAAmF;gCACrF,IAAI,EAAE,QAAQ;6BACf;4B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