@encore.dev/sdk 2.0.0-beta.15 → 2.0.0-beta.17
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 +111 -101
- package/app_meta.ts +56 -54
- package/config/config.ts +60 -57
- package/config/secrets.ts +45 -52
- package/config/value.ts +23 -26
- package/cron/mod.ts +28 -29
- package/dist/app_meta.d.ts +52 -50
- package/dist/app_meta.d.ts.map +1 -1
- package/dist/app_meta.js +2 -2
- package/dist/app_meta.js.map +1 -1
- package/dist/config/config.d.ts +58 -55
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/config.js +8 -9
- package/dist/config/config.js.map +1 -1
- package/dist/config/secrets.d.ts +45 -52
- package/dist/config/secrets.d.ts.map +1 -1
- package/dist/config/secrets.js +8 -9
- package/dist/config/secrets.js.map +1 -1
- package/dist/config/value.d.ts +20 -23
- package/dist/config/value.d.ts.map +1 -1
- package/dist/config/value.js +20 -23
- package/dist/config/value.js.map +1 -1
- package/dist/cron/mod.d.ts +26 -27
- package/dist/cron/mod.d.ts.map +1 -1
- package/dist/cron/mod.js +13 -14
- package/dist/cron/mod.js.map +1 -1
- package/dist/frontends/mod.d.ts +20 -19
- package/dist/frontends/mod.d.ts.map +1 -1
- package/dist/frontends/mod.js +20 -19
- package/dist/frontends/mod.js.map +1 -1
- package/dist/gateway/errors.d.ts +28 -30
- package/dist/gateway/errors.d.ts.map +1 -1
- package/dist/gateway/errors.js +29 -31
- package/dist/gateway/errors.js.map +1 -1
- package/dist/gateway/match.d.ts +54 -54
- package/dist/gateway/match.d.ts.map +1 -1
- package/dist/gateway/match.js +56 -56
- package/dist/gateway/match.js.map +1 -1
- package/dist/gateway/middleware.d.ts +62 -64
- package/dist/gateway/middleware.d.ts.map +1 -1
- package/dist/gateway/middleware.js +1 -1
- package/dist/gateway/middleware.js.map +1 -1
- package/dist/gateway/mod.d.ts +64 -67
- package/dist/gateway/mod.d.ts.map +1 -1
- package/dist/gateway/mod.js +72 -76
- package/dist/gateway/mod.js.map +1 -1
- package/dist/gateway/request.d.ts +138 -134
- package/dist/gateway/request.d.ts.map +1 -1
- package/dist/gateway/request.js +117 -108
- package/dist/gateway/request.js.map +1 -1
- package/dist/gateway/serve.d.ts +29 -34
- package/dist/gateway/serve.d.ts.map +1 -1
- package/dist/gateway/serve.js +51 -56
- package/dist/gateway/serve.js.map +1 -1
- package/dist/gateways/mod.d.ts +23 -21
- package/dist/gateways/mod.d.ts.map +1 -1
- package/dist/gateways/mod.js +25 -23
- package/dist/gateways/mod.js.map +1 -1
- package/dist/internal/runtime/napi/napi.cjs +1 -1
- package/dist/internal/runtime/napi/napi.d.cts +10 -3
- package/dist/internal/runtime/shutdown.d.ts +75 -57
- package/dist/internal/runtime/shutdown.d.ts.map +1 -1
- package/dist/internal/runtime/shutdown.js +88 -84
- package/dist/internal/runtime/shutdown.js.map +1 -1
- package/dist/log/logger.d.ts +43 -37
- package/dist/log/logger.d.ts.map +1 -1
- package/dist/log/logger.js +26 -25
- package/dist/log/logger.js.map +1 -1
- package/dist/metrics/mod.d.ts +133 -114
- package/dist/metrics/mod.d.ts.map +1 -1
- package/dist/metrics/mod.js +109 -101
- package/dist/metrics/mod.js.map +1 -1
- package/dist/otel.d.ts +6 -3
- package/dist/otel.d.ts.map +1 -1
- package/dist/otel.js +6 -3
- package/dist/otel.js.map +1 -1
- package/dist/pubsub/subscription.d.ts +88 -116
- package/dist/pubsub/subscription.d.ts.map +1 -1
- package/dist/pubsub/subscription.js +14 -17
- package/dist/pubsub/subscription.js.map +1 -1
- package/dist/pubsub/topic.d.ts +86 -113
- package/dist/pubsub/topic.d.ts.map +1 -1
- package/dist/pubsub/topic.js +68 -82
- package/dist/pubsub/topic.js.map +1 -1
- package/dist/reqctx/mod.d.ts +83 -86
- package/dist/reqctx/mod.d.ts.map +1 -1
- package/dist/reqctx/mod.js +39 -41
- package/dist/reqctx/mod.js.map +1 -1
- package/dist/services/index.d.ts +76 -75
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +73 -71
- package/dist/services/index.js.map +1 -1
- package/dist/shutdown/mod.d.ts +26 -25
- package/dist/shutdown/mod.d.ts.map +1 -1
- package/dist/shutdown/mod.js +26 -25
- package/dist/shutdown/mod.js.map +1 -1
- package/dist/storage/clickhouse/database.d.ts +113 -115
- package/dist/storage/clickhouse/database.d.ts.map +1 -1
- package/dist/storage/clickhouse/database.js +65 -79
- package/dist/storage/clickhouse/database.js.map +1 -1
- package/dist/storage/clickhouse/errors.d.ts +25 -26
- package/dist/storage/clickhouse/errors.d.ts.map +1 -1
- package/dist/storage/clickhouse/errors.js +15 -17
- package/dist/storage/clickhouse/errors.js.map +1 -1
- package/dist/storage/clickhouse/mod.d.ts +10 -10
- package/dist/storage/clickhouse/mod.js +10 -10
- package/dist/storage/objects/bucket.d.ts +196 -225
- package/dist/storage/objects/bucket.d.ts.map +1 -1
- package/dist/storage/objects/bucket.js +71 -84
- package/dist/storage/objects/bucket.js.map +1 -1
- package/dist/storage/objects/error.d.ts +4 -4
- package/dist/storage/objects/error.js +4 -4
- package/dist/storage/postgres/database.d.ts +124 -149
- package/dist/storage/postgres/database.d.ts.map +1 -1
- package/dist/storage/postgres/database.js +98 -135
- package/dist/storage/postgres/database.js.map +1 -1
- package/dist/storage/postgres/errors.d.ts +42 -48
- package/dist/storage/postgres/errors.d.ts.map +1 -1
- package/dist/storage/postgres/errors.js +44 -51
- package/dist/storage/postgres/errors.js.map +1 -1
- package/dist/storage/postgres/interval.d.ts +19 -19
- package/dist/storage/postgres/interval.d.ts.map +1 -1
- package/dist/storage/postgres/interval.js +21 -21
- package/dist/storage/postgres/interval.js.map +1 -1
- package/dist/storage/redis/bitfield.d.ts +48 -23
- package/dist/storage/redis/bitfield.d.ts.map +1 -1
- package/dist/storage/redis/bitfield.js +38 -19
- package/dist/storage/redis/bitfield.js.map +1 -1
- package/dist/storage/redis/command.d.ts +16 -12
- package/dist/storage/redis/command.d.ts.map +1 -1
- package/dist/storage/redis/command.js +16 -12
- package/dist/storage/redis/command.js.map +1 -1
- package/dist/storage/redis/commands.d.ts +99 -100
- package/dist/storage/redis/commands.d.ts.map +1 -1
- package/dist/storage/redis/commands.js +84 -85
- package/dist/storage/redis/commands.js.map +1 -1
- package/dist/storage/redis/database.d.ts +138 -122
- package/dist/storage/redis/database.d.ts.map +1 -1
- package/dist/storage/redis/database.js +120 -101
- package/dist/storage/redis/database.js.map +1 -1
- package/dist/storage/redis/mod.d.ts +52 -48
- package/dist/storage/redis/mod.d.ts.map +1 -1
- package/dist/storage/redis/mod.js +52 -48
- package/dist/storage/redis/mod.js.map +1 -1
- package/dist/storage/redis/options.d.ts +26 -24
- package/dist/storage/redis/options.d.ts.map +1 -1
- package/dist/storage/redis/options.js.map +1 -1
- package/dist/storage/redis/pubsub.d.ts +16 -16
- package/dist/storage/redis/pubsub.d.ts.map +1 -1
- package/dist/storage/redis/pubsub.js +14 -14
- package/dist/storage/redis/pubsub.js.map +1 -1
- package/dist/storage/redis/reply.d.ts +80 -72
- package/dist/storage/redis/reply.d.ts.map +1 -1
- package/dist/storage/redis/reply.js +53 -46
- package/dist/storage/redis/reply.js.map +1 -1
- package/dist/storage/redis/scan.d.ts +4 -4
- package/dist/storage/redis/scan.d.ts.map +1 -1
- package/dist/storage/redis/scan.js +6 -6
- package/dist/storage/redis/scan.js.map +1 -1
- package/dist/storage/redis/script.d.ts +28 -21
- package/dist/storage/redis/script.d.ts.map +1 -1
- package/dist/storage/redis/script.js +29 -22
- package/dist/storage/redis/script.js.map +1 -1
- package/dist/storage/redis/target.d.ts +17 -1
- package/dist/storage/redis/target.d.ts.map +1 -1
- package/dist/storage/redis/target.js +30 -1
- package/dist/storage/redis/target.js.map +1 -1
- package/dist/storage/redis/wire.d.ts +6 -6
- package/dist/storage/redis/wire.d.ts.map +1 -1
- package/dist/storage/redis/wire.js +6 -6
- package/dist/storage/redis/wire.js.map +1 -1
- package/dist/testing/mod.d.ts +83 -88
- package/dist/testing/mod.d.ts.map +1 -1
- package/dist/testing/mod.js +75 -81
- package/dist/testing/mod.js.map +1 -1
- package/dist/testing/playwright.d.ts +28 -32
- package/dist/testing/playwright.d.ts.map +1 -1
- package/dist/testing/playwright.js +22 -27
- package/dist/testing/playwright.js.map +1 -1
- package/dist/testing/puppeteer.d.ts +11 -12
- package/dist/testing/puppeteer.d.ts.map +1 -1
- package/dist/testing/puppeteer.js +17 -18
- package/dist/testing/puppeteer.js.map +1 -1
- package/dist/testing/system.d.ts +72 -90
- package/dist/testing/system.d.ts.map +1 -1
- package/dist/testing/system.js +90 -107
- package/dist/testing/system.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/frontends/mod.test.ts +6 -2
- package/frontends/mod.ts +20 -19
- package/gateway/errors.ts +30 -32
- package/gateway/match.ts +61 -57
- package/gateway/middleware.ts +62 -64
- package/gateway/mod.ts +73 -76
- package/gateway/request.ts +143 -140
- package/gateway/serve.ts +58 -63
- package/gateways/mod.ts +25 -23
- package/internal/runtime/napi/napi.cjs +1 -1
- package/internal/runtime/napi/napi.d.cts +10 -3
- package/internal/runtime/shutdown.ts +113 -101
- package/log/logger.test.ts +8 -0
- package/log/logger.ts +48 -45
- package/metrics/mod.ts +138 -122
- package/otel.ts +6 -3
- package/package.json +1 -1
- package/pubsub/subscription.ts +93 -123
- package/pubsub/topic.ts +96 -130
- package/reqctx/mod.ts +83 -86
- package/services/index.ts +78 -78
- package/shutdown/mod.ts +26 -25
- package/storage/clickhouse/database.ts +115 -129
- package/storage/clickhouse/errors.ts +27 -29
- package/storage/clickhouse/mod.ts +10 -10
- package/storage/objects/bucket.ts +209 -239
- package/storage/objects/error.ts +4 -4
- package/storage/postgres/database.ts +131 -164
- package/storage/postgres/errors.ts +45 -52
- package/storage/postgres/interval.ts +21 -21
- package/storage/redis/bitfield.ts +51 -26
- package/storage/redis/command.ts +16 -12
- package/storage/redis/commands.ts +99 -100
- package/storage/redis/database.ts +145 -123
- package/storage/redis/mod.ts +52 -48
- package/storage/redis/options.ts +26 -24
- package/storage/redis/pubsub.ts +14 -14
- package/storage/redis/redis.test.ts +17 -2
- package/storage/redis/reply.ts +85 -77
- package/storage/redis/scan.ts +6 -6
- package/storage/redis/script.ts +29 -22
- package/storage/redis/target.ts +34 -1
- package/storage/redis/wire.ts +8 -8
- package/testing/mod.ts +99 -105
- package/testing/playwright.ts +32 -37
- package/testing/puppeteer.ts +22 -23
- package/testing/system.ts +117 -133
package/dist/log/logger.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
/// <reference types="node" />
|
|
3
3
|
/**
|
|
4
|
-
* A field value
|
|
4
|
+
* A field value supported by structured logging.
|
|
5
5
|
*/
|
|
6
6
|
export type FieldValue = string | number | boolean | null | undefined | FieldsObject | FieldValue[];
|
|
7
7
|
/**
|
|
8
|
-
* A map of fields
|
|
8
|
+
* A map of structured fields attached to a log record.
|
|
9
9
|
*/
|
|
10
10
|
export type FieldsObject = Record<string, FieldValue>;
|
|
11
11
|
export declare enum LogLevel {
|
|
@@ -16,52 +16,59 @@ export declare enum LogLevel {
|
|
|
16
16
|
Error = 5,
|
|
17
17
|
Fatal = 6
|
|
18
18
|
}
|
|
19
|
-
/**
|
|
19
|
+
/** Sentinel level above all log levels; disables logging completely. */
|
|
20
20
|
export declare const OFF: number;
|
|
21
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* Parses a case-insensitive log level name or `"off"`, defaulting to
|
|
23
|
+
* {@link LogLevel.Trace} for unrecognized or empty values.
|
|
24
|
+
*/
|
|
22
25
|
export declare function parseLevel(name: string | undefined): LogLevel;
|
|
23
26
|
/** @internal */
|
|
24
27
|
export interface LoggerOptions {
|
|
25
|
-
/**
|
|
28
|
+
/** Minimum level to emit. */
|
|
26
29
|
level: LogLevel;
|
|
27
|
-
/**
|
|
30
|
+
/** Logger name recorded on each log line. */
|
|
28
31
|
name?: string;
|
|
29
|
-
/**
|
|
32
|
+
/** Default attributes attached to every log record. */
|
|
30
33
|
fields?: FieldsObject;
|
|
31
|
-
/**
|
|
34
|
+
/** Sink for encoded log lines; defaults to stderr. */
|
|
32
35
|
write?: (line: Buffer) => void;
|
|
33
36
|
}
|
|
34
|
-
/**
|
|
37
|
+
/** Structured fields for a log record beyond its level and logger name. */
|
|
35
38
|
export interface RecordParts {
|
|
36
|
-
/**
|
|
39
|
+
/** Timestamp in Unix milliseconds; defaults to the current time. */
|
|
37
40
|
timeUnixMillis?: number;
|
|
38
|
-
message
|
|
39
|
-
/**
|
|
41
|
+
message?: string;
|
|
42
|
+
/** 25-byte encoded span context (trace ID, span ID, trace flags). */
|
|
40
43
|
spanCtx?: Buffer;
|
|
41
44
|
exceptionType?: string;
|
|
42
45
|
exceptionMessage?: string;
|
|
43
|
-
/**
|
|
46
|
+
/** JavaScript stack trace string. */
|
|
44
47
|
exceptionStacktrace?: string;
|
|
45
|
-
/**
|
|
48
|
+
/** Calling function name. */
|
|
46
49
|
codeFunction?: string;
|
|
47
|
-
/**
|
|
50
|
+
/** Caller source file, line, and column. */
|
|
48
51
|
codeFile?: string;
|
|
49
52
|
codeLine?: number;
|
|
50
53
|
codeColumn?: number;
|
|
51
|
-
/**
|
|
52
|
-
*
|
|
54
|
+
/**
|
|
55
|
+
* Runtime module target for internal runtime logs; replaces the logger name
|
|
56
|
+
* with the runtime logger when set.
|
|
57
|
+
*/
|
|
53
58
|
runtimeTarget?: string;
|
|
54
|
-
/**
|
|
59
|
+
/** JSON-encoded object of user attributes. */
|
|
55
60
|
attrsJson?: string;
|
|
56
61
|
}
|
|
57
62
|
/**
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
63
|
+
* Structured logger that writes one Encore-formatted log record per line to
|
|
64
|
+
* stderr, including the logger name, bound and per-call attributes, and active
|
|
65
|
+
* span IDs.
|
|
66
|
+
*
|
|
67
|
+
* Lines are encoded by the native SDK core without requiring the full runtime,
|
|
68
|
+
* and are written synchronously so no records are lost on `process.exit`.
|
|
69
|
+
* Attributes colliding with reserved log keys are promoted when valid or stored
|
|
70
|
+
* under `raw.<key>` otherwise; attributes colliding with exception fields are
|
|
71
|
+
* always stored under `raw.<key>`.
|
|
65
72
|
*/
|
|
66
73
|
export declare class Logger {
|
|
67
74
|
private readonly level;
|
|
@@ -71,44 +78,44 @@ export declare class Logger {
|
|
|
71
78
|
/** @internal */
|
|
72
79
|
constructor(options: LoggerOptions);
|
|
73
80
|
/**
|
|
74
|
-
* Returns a new logger with the specified level.
|
|
81
|
+
* Returns a new logger with the specified minimum level.
|
|
75
82
|
*/
|
|
76
83
|
withLevel(level: LogLevel): Logger;
|
|
77
84
|
/**
|
|
78
|
-
* Returns a new logger
|
|
79
|
-
* this logger's level and fields.
|
|
85
|
+
* Returns a new logger with the given `name` (recorded as `logger` on each
|
|
86
|
+
* log line), inheriting this logger's level and fields.
|
|
80
87
|
*/
|
|
81
88
|
withName(name: string): Logger;
|
|
82
89
|
/**
|
|
83
|
-
* Returns a new logger with the given fields
|
|
90
|
+
* Returns a new logger with the given fields merged into its default context.
|
|
84
91
|
*/
|
|
85
92
|
with(fields: FieldsObject): Logger;
|
|
86
93
|
/**
|
|
87
|
-
*
|
|
94
|
+
* Logs a message at the trace level.
|
|
88
95
|
*/
|
|
89
96
|
trace(msg: string, fields?: FieldsObject): void;
|
|
90
97
|
/**
|
|
91
|
-
*
|
|
98
|
+
* Logs a message at the debug level.
|
|
92
99
|
*/
|
|
93
100
|
debug(msg: string, fields?: FieldsObject): void;
|
|
94
101
|
/**
|
|
95
|
-
*
|
|
102
|
+
* Logs a message at the info level.
|
|
96
103
|
*/
|
|
97
104
|
info(msg: string, fields?: FieldsObject): void;
|
|
98
105
|
/**
|
|
99
|
-
*
|
|
106
|
+
* Logs a message or error at the warn level.
|
|
100
107
|
*/
|
|
101
108
|
warn(err: Error | unknown, fields?: FieldsObject): void;
|
|
102
109
|
warn(err: Error | unknown, msg: string, fields?: FieldsObject): void;
|
|
103
110
|
warn(msg: string, fields?: FieldsObject): void;
|
|
104
111
|
/**
|
|
105
|
-
*
|
|
112
|
+
* Logs a message or error at the error level.
|
|
106
113
|
*/
|
|
107
114
|
error(err: Error | unknown, fields?: FieldsObject): void;
|
|
108
115
|
error(err: Error | unknown, msg: string, fields?: FieldsObject): void;
|
|
109
116
|
error(msg: string, fields?: FieldsObject): void;
|
|
110
117
|
/**
|
|
111
|
-
*
|
|
118
|
+
* Logs a message or error at the fatal level.
|
|
112
119
|
*/
|
|
113
120
|
fatal(err: Error | unknown, fields?: FieldsObject): void;
|
|
114
121
|
fatal(err: Error | unknown, msg: string, fields?: FieldsObject): void;
|
|
@@ -116,8 +123,7 @@ export declare class Logger {
|
|
|
116
123
|
private options;
|
|
117
124
|
private log;
|
|
118
125
|
/**
|
|
119
|
-
*
|
|
120
|
-
* logger's level.
|
|
126
|
+
* Writes a log record if `level` is at or above this logger's minimum level.
|
|
121
127
|
* @internal
|
|
122
128
|
*/
|
|
123
129
|
emit(level: LogLevel, parts: RecordParts): void;
|
package/dist/log/logger.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../log/logger.ts"],"names":[],"mappings":";;AAKA;;GAEG;AAGH,MAAM,MAAM,UAAU,GACpB,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,GAAG,YAAY,GAAG,UAAU,EAAE,CAAC;AAE7E;;GAEG;AAGH,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;AAEtD,oBAAY,QAAQ;IAClB,KAAK,IAAI;IACT,KAAK,IAAA;IACL,IAAI,IAAA;IACJ,IAAI,IAAA;IACJ,KAAK,IAAA;IACL,KAAK,IAAA;CACN;AAED,
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../log/logger.ts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KAAK,CAAC,GAAG,EAAE,KAAK,GAAG,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,IAAI;IACrE,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,IAAI;IAK/C;;OAEG;IACH,KAAK,CAAC,GAAG,EAAE,KAAK,GAAG,OAAO,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,IAAI;IACxD,KAAK,CAAC,GAAG,EAAE,KAAK,GAAG,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,IAAI;IACrE,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,IAAI;IAK/C,OAAO,CAAC,OAAO;IASf,OAAO,CAAC,GAAG;IAwCX;;;OAGG;IACH,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,GAAG,IAAI;CAQhD"}
|
package/dist/log/logger.js
CHANGED
|
@@ -11,9 +11,9 @@ export var LogLevel;
|
|
|
11
11
|
LogLevel[LogLevel["Error"] = 5] = "Error";
|
|
12
12
|
LogLevel[LogLevel["Fatal"] = 6] = "Fatal";
|
|
13
13
|
})(LogLevel || (LogLevel = {}));
|
|
14
|
-
/**
|
|
14
|
+
/** Sentinel level above all log levels; disables logging completely. */
|
|
15
15
|
export const OFF = LogLevel.Fatal + 1;
|
|
16
|
-
/**
|
|
16
|
+
/** Level names recognized by `ENCORE_LOG`. */
|
|
17
17
|
const LEVELS = {
|
|
18
18
|
[LogLevel.Trace]: 'trace',
|
|
19
19
|
[LogLevel.Debug]: 'debug',
|
|
@@ -22,7 +22,10 @@ const LEVELS = {
|
|
|
22
22
|
[LogLevel.Error]: 'error',
|
|
23
23
|
[LogLevel.Fatal]: 'fatal',
|
|
24
24
|
};
|
|
25
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Parses a case-insensitive log level name or `"off"`, defaulting to
|
|
27
|
+
* {@link LogLevel.Trace} for unrecognized or empty values.
|
|
28
|
+
*/
|
|
26
29
|
export function parseLevel(name) {
|
|
27
30
|
const v = name?.toLowerCase();
|
|
28
31
|
if (v === 'off')
|
|
@@ -31,13 +34,15 @@ export function parseLevel(name) {
|
|
|
31
34
|
return found ? Number(found[0]) : LogLevel.Trace;
|
|
32
35
|
}
|
|
33
36
|
/**
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
37
|
+
* Structured logger that writes one Encore-formatted log record per line to
|
|
38
|
+
* stderr, including the logger name, bound and per-call attributes, and active
|
|
39
|
+
* span IDs.
|
|
40
|
+
*
|
|
41
|
+
* Lines are encoded by the native SDK core without requiring the full runtime,
|
|
42
|
+
* and are written synchronously so no records are lost on `process.exit`.
|
|
43
|
+
* Attributes colliding with reserved log keys are promoted when valid or stored
|
|
44
|
+
* under `raw.<key>` otherwise; attributes colliding with exception fields are
|
|
45
|
+
* always stored under `raw.<key>`.
|
|
41
46
|
*/
|
|
42
47
|
export class Logger {
|
|
43
48
|
level;
|
|
@@ -52,20 +57,20 @@ export class Logger {
|
|
|
52
57
|
this.write = options.write ?? writeStderr;
|
|
53
58
|
}
|
|
54
59
|
/**
|
|
55
|
-
* Returns a new logger with the specified level.
|
|
60
|
+
* Returns a new logger with the specified minimum level.
|
|
56
61
|
*/
|
|
57
62
|
withLevel(level) {
|
|
58
63
|
return new Logger({ ...this.options(), level });
|
|
59
64
|
}
|
|
60
65
|
/**
|
|
61
|
-
* Returns a new logger
|
|
62
|
-
* this logger's level and fields.
|
|
66
|
+
* Returns a new logger with the given `name` (recorded as `logger` on each
|
|
67
|
+
* log line), inheriting this logger's level and fields.
|
|
63
68
|
*/
|
|
64
69
|
withName(name) {
|
|
65
70
|
return new Logger({ ...this.options(), name });
|
|
66
71
|
}
|
|
67
72
|
/**
|
|
68
|
-
* Returns a new logger with the given fields
|
|
73
|
+
* Returns a new logger with the given fields merged into its default context.
|
|
69
74
|
*/
|
|
70
75
|
with(fields) {
|
|
71
76
|
return new Logger({
|
|
@@ -74,19 +79,19 @@ export class Logger {
|
|
|
74
79
|
});
|
|
75
80
|
}
|
|
76
81
|
/**
|
|
77
|
-
*
|
|
82
|
+
* Logs a message at the trace level.
|
|
78
83
|
*/
|
|
79
84
|
trace(msg, fields) {
|
|
80
85
|
this.log(LogLevel.Trace, msg, fields);
|
|
81
86
|
}
|
|
82
87
|
/**
|
|
83
|
-
*
|
|
88
|
+
* Logs a message at the debug level.
|
|
84
89
|
*/
|
|
85
90
|
debug(msg, fields) {
|
|
86
91
|
this.log(LogLevel.Debug, msg, fields);
|
|
87
92
|
}
|
|
88
93
|
/**
|
|
89
|
-
*
|
|
94
|
+
* Logs a message at the info level.
|
|
90
95
|
*/
|
|
91
96
|
info(msg, fields) {
|
|
92
97
|
this.log(LogLevel.Info, msg, fields);
|
|
@@ -130,7 +135,6 @@ export class Logger {
|
|
|
130
135
|
fields = possibleFields;
|
|
131
136
|
}
|
|
132
137
|
else {
|
|
133
|
-
msg = '';
|
|
134
138
|
fields = msgOrFields;
|
|
135
139
|
}
|
|
136
140
|
}
|
|
@@ -145,8 +149,7 @@ export class Logger {
|
|
|
145
149
|
});
|
|
146
150
|
}
|
|
147
151
|
/**
|
|
148
|
-
*
|
|
149
|
-
* logger's level.
|
|
152
|
+
* Writes a log record if `level` is at or above this logger's minimum level.
|
|
150
153
|
* @internal
|
|
151
154
|
*/
|
|
152
155
|
emit(level, parts) {
|
|
@@ -160,12 +163,11 @@ export class Logger {
|
|
|
160
163
|
}
|
|
161
164
|
}
|
|
162
165
|
}
|
|
163
|
-
/**
|
|
164
|
-
* OpenTelemetry severity number. */
|
|
166
|
+
/** Encodes a log record in the Encore format using an OpenTelemetry severity number. */
|
|
165
167
|
function encode(severity, logger, p) {
|
|
166
168
|
return encodeLog(severity, p.timeUnixMillis, p.message, logger, p.spanCtx, p.exceptionType, p.exceptionMessage, p.exceptionStacktrace, p.codeFunction, p.codeFile, p.codeLine, p.codeColumn, p.runtimeTarget, p.attrsJson);
|
|
167
169
|
}
|
|
168
|
-
/** `span`
|
|
170
|
+
/** Encodes `span` into its 25-byte wire form (trace ID, span ID, flags). */
|
|
169
171
|
function spanBytes(span) {
|
|
170
172
|
const b = Buffer.allocUnsafe(25);
|
|
171
173
|
b.write(span.traceId, 0, 16, 'hex');
|
|
@@ -173,8 +175,7 @@ function spanBytes(span) {
|
|
|
173
175
|
b[24] = span.traceFlags & 0xff;
|
|
174
176
|
return b;
|
|
175
177
|
}
|
|
176
|
-
/** `attrs`
|
|
177
|
-
* `undefined` left out; a value JSON cannot hold (a cycle) as its string. */
|
|
178
|
+
/** Serializes `attrs` to JSON, converting bigints, errors, and non-serializable values to strings. */
|
|
178
179
|
function attrsJson(attrs) {
|
|
179
180
|
try {
|
|
180
181
|
return JSON.stringify(attrs, replacer);
|
package/dist/log/logger.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../log/logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAE,KAAK,EAAmB,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EAAC,aAAa,EAAC,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAC,SAAS,EAAC,MAAM,mCAAmC,CAAC;AAC5D,OAAO,EAAC,WAAW,EAAC,MAAM,UAAU,CAAC;AAiBrC,MAAM,CAAN,IAAY,QAOX;AAPD,WAAY,QAAQ;IAClB,yCAAS,CAAA;IACT,yCAAK,CAAA;IACL,uCAAI,CAAA;IACJ,uCAAI,CAAA;IACJ,yCAAK,CAAA;IACL,yCAAK,CAAA;AACP,CAAC,EAPW,QAAQ,KAAR,QAAQ,QAOnB;AAED,
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../log/logger.ts"],"names":[],"mappings":"AAAA,OA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