@rabby-wallet/rabby-logger 0.2.1-alpha
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 +191 -0
- package/dist/core.d.ts +74 -0
- package/dist/core.d.ts.map +1 -0
- package/dist/core.js +323 -0
- package/dist/core.js.map +1 -0
- package/dist/format.d.ts +31 -0
- package/dist/format.d.ts.map +1 -0
- package/dist/format.js +276 -0
- package/dist/format.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -0
- package/dist/parse.d.ts +21 -0
- package/dist/parse.d.ts.map +1 -0
- package/dist/parse.js +276 -0
- package/dist/parse.js.map +1 -0
- package/dist/rollingZipWriter.d.ts +64 -0
- package/dist/rollingZipWriter.d.ts.map +1 -0
- package/dist/rollingZipWriter.js +312 -0
- package/dist/rollingZipWriter.js.map +1 -0
- package/dist/types.d.ts +73 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +6 -0
- package/dist/types.js.map +1 -0
- package/dist/writer.d.ts +14 -0
- package/dist/writer.d.ts.map +1 -0
- package/dist/writer.js +3 -0
- package/dist/writer.js.map +1 -0
- package/package.json +35 -0
package/README.md
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
# @rabby-wallet/rabby-logger
|
|
2
|
+
|
|
3
|
+
Platform-agnostic Rabby log parsing and writing primitives.
|
|
4
|
+
|
|
5
|
+
This package provides:
|
|
6
|
+
|
|
7
|
+
- parsing for Rabby `.log` files and exported `.zip` archives
|
|
8
|
+
- `@rabby-log/v1` line formatting
|
|
9
|
+
- a generic rolling zip writer
|
|
10
|
+
- a generic logger core
|
|
11
|
+
|
|
12
|
+
It does **not** ship platform-specific storage or lifecycle adapters.
|
|
13
|
+
|
|
14
|
+
## Install
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install @rabby-wallet/rabby-logger
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Parse logs
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
import {
|
|
24
|
+
mergeParsedLogInputs,
|
|
25
|
+
parseRabbyLogInputBytes,
|
|
26
|
+
} from "@rabby-wallet/rabby-logger";
|
|
27
|
+
|
|
28
|
+
const inputs = await Promise.all(
|
|
29
|
+
files.map(async (file) =>
|
|
30
|
+
parseRabbyLogInputBytes(file.name, await file.arrayBuffer()),
|
|
31
|
+
),
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
const dataset = mergeParsedLogInputs(inputs);
|
|
35
|
+
console.log(dataset.records[0]?.message);
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Write logs
|
|
39
|
+
|
|
40
|
+
Most hosts should **not** implement a new writer from scratch.
|
|
41
|
+
|
|
42
|
+
Recommended path:
|
|
43
|
+
|
|
44
|
+
1. implement `LoggingFileSystemAdapter`
|
|
45
|
+
2. use the built-in `RollingZipLogWriter`
|
|
46
|
+
3. pass it to `AppLogger`
|
|
47
|
+
|
|
48
|
+
```ts
|
|
49
|
+
import {
|
|
50
|
+
AppLogger,
|
|
51
|
+
RollingZipLogWriter,
|
|
52
|
+
type LoggingFileSystemAdapter,
|
|
53
|
+
} from "@rabby-wallet/rabby-logger";
|
|
54
|
+
|
|
55
|
+
const myFsAdapter: LoggingFileSystemAdapter = {
|
|
56
|
+
mkdir: async (path) => {},
|
|
57
|
+
readFile: async (path, encoding) => "...",
|
|
58
|
+
writeFile: async (path, contents, encoding) => {},
|
|
59
|
+
appendFile: async (path, contents, encoding) => {},
|
|
60
|
+
moveFile: async (from, to) => {},
|
|
61
|
+
listFiles: async (path) => [],
|
|
62
|
+
unlink: async (path) => {},
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
const writer = new RollingZipLogWriter({
|
|
66
|
+
fs: myFsAdapter,
|
|
67
|
+
rootDir: "/applogs",
|
|
68
|
+
archivePrefix: "rabby-mobile-logs",
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
const logger = new AppLogger({
|
|
72
|
+
runtimeEnv: "production",
|
|
73
|
+
platform: "ios",
|
|
74
|
+
writer,
|
|
75
|
+
shouldWriteToFile: () => true,
|
|
76
|
+
shouldCaptureConsole: () => true,
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
logger.installConsoleCapture();
|
|
80
|
+
logger.info("app boot");
|
|
81
|
+
await logger.flush();
|
|
82
|
+
await logger.finalizeArchive();
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Bring Your Own Writer
|
|
86
|
+
|
|
87
|
+
If your host already owns archive layout, rotation, or native zip writing,
|
|
88
|
+
implement `AppLogWriter` instead of `LoggingFileSystemAdapter`.
|
|
89
|
+
|
|
90
|
+
```ts
|
|
91
|
+
import { AppLogger, type AppLogWriter } from "@rabby-wallet/rabby-logger";
|
|
92
|
+
|
|
93
|
+
class NativeArchiveWriter implements AppLogWriter {
|
|
94
|
+
async writeLine(line: string) {
|
|
95
|
+
await nativeLogger.appendUtf8Line(line);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
async flush() {
|
|
99
|
+
await nativeLogger.flush();
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
async finalizeArchive() {
|
|
103
|
+
return nativeLogger.finalizeZip();
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
getState() {
|
|
107
|
+
return {
|
|
108
|
+
rootDir: "/native/applogs",
|
|
109
|
+
activeArchivePath: nativeLogger.currentArchivePath(),
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const logger = new AppLogger({
|
|
115
|
+
runtimeEnv: "production",
|
|
116
|
+
platform: "android",
|
|
117
|
+
writer: new NativeArchiveWriter(),
|
|
118
|
+
shouldWriteToFile: () => true,
|
|
119
|
+
});
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## React Native Example
|
|
123
|
+
|
|
124
|
+
This is the same integration shape used by Rabby Mobile: `react-native-fs`
|
|
125
|
+
provides the file operations, while `RollingZipLogWriter` keeps ownership of
|
|
126
|
+
formatting, entry rotation, and archive finalization.
|
|
127
|
+
|
|
128
|
+
```ts
|
|
129
|
+
import { Platform } from "react-native";
|
|
130
|
+
import RNFS from "react-native-fs";
|
|
131
|
+
import {
|
|
132
|
+
AppLogger,
|
|
133
|
+
RollingZipLogWriter,
|
|
134
|
+
type LoggingFileSystemAdapter,
|
|
135
|
+
} from "@rabby-wallet/rabby-logger";
|
|
136
|
+
|
|
137
|
+
const rnfsLoggingAdapter: LoggingFileSystemAdapter = {
|
|
138
|
+
mkdir(path) {
|
|
139
|
+
return RNFS.mkdir(path, { NSURLIsExcludedFromBackupKey: true });
|
|
140
|
+
},
|
|
141
|
+
readFile(path, encoding) {
|
|
142
|
+
return RNFS.readFile(path, encoding);
|
|
143
|
+
},
|
|
144
|
+
writeFile(path, contents, encoding) {
|
|
145
|
+
return RNFS.writeFile(path, contents, encoding);
|
|
146
|
+
},
|
|
147
|
+
appendFile(path, contents, encoding) {
|
|
148
|
+
return RNFS.appendFile(path, contents, encoding);
|
|
149
|
+
},
|
|
150
|
+
moveFile(from, to) {
|
|
151
|
+
return RNFS.moveFile(from, to);
|
|
152
|
+
},
|
|
153
|
+
async listFiles(path) {
|
|
154
|
+
const entries = await RNFS.readDir(path);
|
|
155
|
+
return entries.filter(item => item.isFile()).map(item => ({
|
|
156
|
+
name: item.name,
|
|
157
|
+
path: item.path,
|
|
158
|
+
size: item.size,
|
|
159
|
+
mtimeMs: item.mtime ? item.mtime.getTime() : undefined,
|
|
160
|
+
}));
|
|
161
|
+
},
|
|
162
|
+
unlink(path) {
|
|
163
|
+
return RNFS.unlink(path);
|
|
164
|
+
},
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
const writer = new RollingZipLogWriter({
|
|
168
|
+
fs: rnfsLoggingAdapter,
|
|
169
|
+
rootDir: `${RNFS.DocumentDirectoryPath}/applogs`,
|
|
170
|
+
archivePrefix: "rabby-mobile-logs",
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
export const logger = new AppLogger({
|
|
174
|
+
runtimeEnv: "production",
|
|
175
|
+
platform: Platform.OS,
|
|
176
|
+
writer,
|
|
177
|
+
shouldWriteToFile: () => true,
|
|
178
|
+
shouldCaptureConsole: () => true,
|
|
179
|
+
});
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
## Host responsibilities
|
|
183
|
+
|
|
184
|
+
The host application must provide:
|
|
185
|
+
|
|
186
|
+
- either a `LoggingFileSystemAdapter` for `RollingZipLogWriter`, or an
|
|
187
|
+
`AppLogWriter`
|
|
188
|
+
- its own app lifecycle integration
|
|
189
|
+
- any platform-specific file sharing or export flow
|
|
190
|
+
|
|
191
|
+
Repository-only development notes live under `packages/rabby-logger/docs/`.
|
package/dist/core.d.ts
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { MaskedLogValue, SerializableLogValue } from "./format";
|
|
2
|
+
import type { AppLogWriter, AppLogWriterState } from "./writer";
|
|
3
|
+
export type ConsoleLike = {
|
|
4
|
+
log?: (...args: unknown[]) => void;
|
|
5
|
+
info?: (...args: unknown[]) => void;
|
|
6
|
+
warn?: (...args: unknown[]) => void;
|
|
7
|
+
error?: (...args: unknown[]) => void;
|
|
8
|
+
debug?: (...args: unknown[]) => void;
|
|
9
|
+
trace?: (...args: unknown[]) => void;
|
|
10
|
+
time?: (label?: string) => void;
|
|
11
|
+
timeLog?: (label?: string, ...args: unknown[]) => void;
|
|
12
|
+
timeEnd?: (label?: string) => void;
|
|
13
|
+
assert?: (...args: unknown[]) => void;
|
|
14
|
+
};
|
|
15
|
+
type InMemoryLogLevel = "info" | "warn" | "error" | "debug";
|
|
16
|
+
export type AppLoggerOptions = {
|
|
17
|
+
runtimeEnv: string;
|
|
18
|
+
platform?: string;
|
|
19
|
+
writer: AppLogWriter;
|
|
20
|
+
shouldWriteToFile: () => boolean;
|
|
21
|
+
shouldCaptureConsole?: () => boolean;
|
|
22
|
+
originalConsole?: ConsoleLike;
|
|
23
|
+
sessionId?: string;
|
|
24
|
+
now?: () => Date;
|
|
25
|
+
captureInMemory?: boolean;
|
|
26
|
+
onInMemoryLog?: (entry: {
|
|
27
|
+
level: InMemoryLogLevel;
|
|
28
|
+
message: string;
|
|
29
|
+
data?: SerializableLogValue;
|
|
30
|
+
}) => void;
|
|
31
|
+
};
|
|
32
|
+
export type LoggerState = AppLogWriterState & {
|
|
33
|
+
runtimeEnv: string;
|
|
34
|
+
sessionId: string;
|
|
35
|
+
effectiveFileLoggingEnabled: boolean;
|
|
36
|
+
effectiveConsoleCaptureEnabled: boolean;
|
|
37
|
+
};
|
|
38
|
+
export declare class AppLogger {
|
|
39
|
+
readonly mask: <T>(value: T) => MaskedLogValue<T>;
|
|
40
|
+
private readonly writer;
|
|
41
|
+
private readonly runtimeEnv;
|
|
42
|
+
private readonly platform?;
|
|
43
|
+
private readonly shouldWriteToFile;
|
|
44
|
+
private readonly shouldCaptureConsole;
|
|
45
|
+
private readonly now;
|
|
46
|
+
private readonly captureInMemory;
|
|
47
|
+
private readonly onInMemoryLog?;
|
|
48
|
+
private readonly originalConsole;
|
|
49
|
+
private sequence;
|
|
50
|
+
private writeQueue;
|
|
51
|
+
private lastWriteEnabled;
|
|
52
|
+
private readonly sessionId;
|
|
53
|
+
private consoleCaptureInstalled;
|
|
54
|
+
private readonly timers;
|
|
55
|
+
constructor(options: AppLoggerOptions);
|
|
56
|
+
private enqueue;
|
|
57
|
+
private buildRecord;
|
|
58
|
+
private captureRecord;
|
|
59
|
+
private getConsoleEchoArgs;
|
|
60
|
+
log(...args: unknown[]): void;
|
|
61
|
+
info(...args: unknown[]): void;
|
|
62
|
+
warn(...args: unknown[]): void;
|
|
63
|
+
error(...args: unknown[]): void;
|
|
64
|
+
debug(...args: unknown[]): void;
|
|
65
|
+
trace(...args: unknown[]): void;
|
|
66
|
+
installConsoleCapture(consoleTarget?: ConsoleLike): void;
|
|
67
|
+
handlePolicyChange(): Promise<void>;
|
|
68
|
+
handleAppStateChange(nextState: string): Promise<string | null>;
|
|
69
|
+
flush(): Promise<void>;
|
|
70
|
+
finalizeArchive(): Promise<string | null>;
|
|
71
|
+
getState(): LoggerState;
|
|
72
|
+
}
|
|
73
|
+
export {};
|
|
74
|
+
//# sourceMappingURL=core.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,cAAc,EACd,oBAAoB,EAGrB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAEhE,MAAM,MAAM,WAAW,GAAG;IACxB,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IACnC,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IACpC,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IACpC,KAAK,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IACrC,KAAK,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IACrC,KAAK,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IACrC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,OAAO,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IACvD,OAAO,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,MAAM,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAA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Ae,CAAU;IAC1C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAoC;IACnE,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAmB;IAEnD,OAAO,CAAC,QAAQ,CAAK;IACrB,OAAO,CAAC,UAAU,CAAoC;IACtD,OAAO,CAAC,gBAAgB,CAAU;IAClC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,uBAAuB,CAAS;IACxC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA6B;gBAExC,OAAO,EAAE,gBAAgB;IAoCrC,OAAO,CAAC,OAAO;IAYf,OAAO,CAAC,WAAW;IAwCnB,OAAO,CAAC,aAAa;IA4CrB,OAAO,CAAC,kBAAkB;IAY1B,GAAG,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE;IAKtB,IAAI,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE;IAKvB,IAAI,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE;IAKvB,KAAK,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE;IAKxB,KAAK,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE;IAKxB,KAAK,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE;IAcxB,qBAAqB,CACnB,aAAa,GAAE,WAA+C;IAuMhE,kBAAkB;IAalB,oBAAoB,CAAC,SAAS,EAAE,MAAM;IAQtC,KAAK;IAML,eAAe;IAIf,QAAQ,IAAI,WAAW;CASxB"}
|
package/dist/core.js
ADDED
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AppLogger = void 0;
|
|
4
|
+
const format_1 = require("./format");
|
|
5
|
+
const noop = (..._args) => { };
|
|
6
|
+
function bindConsoleMethod(thisArg, value) {
|
|
7
|
+
if (typeof value !== "function") {
|
|
8
|
+
return noop;
|
|
9
|
+
}
|
|
10
|
+
return value.bind(thisArg);
|
|
11
|
+
}
|
|
12
|
+
function hasMaskedValue(input, seen = new WeakSet(), depth = 0) {
|
|
13
|
+
if (input instanceof format_1.MaskedLogValue) {
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
if (!input || typeof input !== "object") {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
if (seen.has(input)) {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
seen.add(input);
|
|
23
|
+
if (depth >= 4) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
if (Array.isArray(input)) {
|
|
27
|
+
return input.some((item) => hasMaskedValue(item, seen, depth + 1));
|
|
28
|
+
}
|
|
29
|
+
return Object.values(input).some((item) => hasMaskedValue(item, seen, depth + 1));
|
|
30
|
+
}
|
|
31
|
+
function mapToInMemoryLevel(level) {
|
|
32
|
+
switch (level) {
|
|
33
|
+
case "warn":
|
|
34
|
+
return "warn";
|
|
35
|
+
case "error":
|
|
36
|
+
return "error";
|
|
37
|
+
case "debug":
|
|
38
|
+
case "trace":
|
|
39
|
+
return "debug";
|
|
40
|
+
default:
|
|
41
|
+
return "info";
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
class AppLogger {
|
|
45
|
+
constructor(options) {
|
|
46
|
+
this.mask = (value) => new format_1.MaskedLogValue(value);
|
|
47
|
+
this.sequence = 0;
|
|
48
|
+
this.writeQueue = Promise.resolve(undefined);
|
|
49
|
+
this.consoleCaptureInstalled = false;
|
|
50
|
+
this.timers = new Map();
|
|
51
|
+
this.writer = options.writer;
|
|
52
|
+
this.runtimeEnv = options.runtimeEnv;
|
|
53
|
+
this.platform = options.platform;
|
|
54
|
+
this.shouldWriteToFile = options.shouldWriteToFile;
|
|
55
|
+
this.shouldCaptureConsole =
|
|
56
|
+
options.shouldCaptureConsole || options.shouldWriteToFile;
|
|
57
|
+
this.now = options.now || (() => new Date());
|
|
58
|
+
this.captureInMemory = !!options.captureInMemory;
|
|
59
|
+
this.onInMemoryLog = options.onInMemoryLog;
|
|
60
|
+
this.lastWriteEnabled = this.shouldWriteToFile();
|
|
61
|
+
this.sessionId = options.sessionId || (0, format_1.createDefaultSessionId)(this.now());
|
|
62
|
+
const consoleLike = options.originalConsole || console;
|
|
63
|
+
this.originalConsole = {
|
|
64
|
+
log: bindConsoleMethod(consoleLike, consoleLike.log),
|
|
65
|
+
info: bindConsoleMethod(consoleLike, consoleLike.info),
|
|
66
|
+
warn: bindConsoleMethod(consoleLike, consoleLike.warn),
|
|
67
|
+
error: bindConsoleMethod(consoleLike, consoleLike.error),
|
|
68
|
+
debug: bindConsoleMethod(consoleLike, consoleLike.debug),
|
|
69
|
+
trace: bindConsoleMethod(consoleLike, consoleLike.trace),
|
|
70
|
+
time: bindConsoleMethod(consoleLike, consoleLike.time),
|
|
71
|
+
timeLog: bindConsoleMethod(consoleLike, consoleLike.timeLog),
|
|
72
|
+
timeEnd: bindConsoleMethod(consoleLike, consoleLike.timeEnd),
|
|
73
|
+
assert: bindConsoleMethod(consoleLike, consoleLike.assert),
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
enqueue(task) {
|
|
77
|
+
const run = this.writeQueue.then(task);
|
|
78
|
+
this.writeQueue = run
|
|
79
|
+
.then(() => undefined)
|
|
80
|
+
.catch((error) => {
|
|
81
|
+
this.originalConsole.error("[AppLogger] background write failed", error);
|
|
82
|
+
});
|
|
83
|
+
return run;
|
|
84
|
+
}
|
|
85
|
+
buildRecord({ level, source, method, args, meta, }) {
|
|
86
|
+
const serializedArgs = (0, format_1.serializeLogArgs)(args);
|
|
87
|
+
const serializedMeta = meta && Object.keys(meta).length
|
|
88
|
+
? (0, format_1.serializeLogArgs)([meta])[0]
|
|
89
|
+
: undefined;
|
|
90
|
+
const record = {
|
|
91
|
+
timestamp: this.now().toISOString(),
|
|
92
|
+
level,
|
|
93
|
+
source,
|
|
94
|
+
method,
|
|
95
|
+
env: this.runtimeEnv,
|
|
96
|
+
sessionId: this.sessionId,
|
|
97
|
+
sequence: ++this.sequence,
|
|
98
|
+
platform: this.platform,
|
|
99
|
+
body: {
|
|
100
|
+
message: (0, format_1.buildInlineMessageFromArgs)(serializedArgs),
|
|
101
|
+
args: serializedArgs,
|
|
102
|
+
...(serializedMeta ? { meta: serializedMeta } : {}),
|
|
103
|
+
},
|
|
104
|
+
};
|
|
105
|
+
return {
|
|
106
|
+
record,
|
|
107
|
+
serializedArgs,
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
captureRecord(level, source, method, args, meta) {
|
|
111
|
+
const { record, serializedArgs } = this.buildRecord({
|
|
112
|
+
level,
|
|
113
|
+
source,
|
|
114
|
+
method,
|
|
115
|
+
args,
|
|
116
|
+
meta,
|
|
117
|
+
});
|
|
118
|
+
if (this.captureInMemory && this.onInMemoryLog) {
|
|
119
|
+
const extraData = record.body.meta ||
|
|
120
|
+
(record.body.args.length > 1 ? record.body.args : record.body.args[0]);
|
|
121
|
+
this.onInMemoryLog({
|
|
122
|
+
level: mapToInMemoryLevel(level),
|
|
123
|
+
message: record.body.message || `[${method}]`,
|
|
124
|
+
data: extraData,
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
const shouldWrite = this.shouldWriteToFile();
|
|
128
|
+
if (this.lastWriteEnabled && !shouldWrite) {
|
|
129
|
+
this.enqueue(async () => {
|
|
130
|
+
await this.writer.finalizeArchive();
|
|
131
|
+
}).catch(noop);
|
|
132
|
+
}
|
|
133
|
+
this.lastWriteEnabled = shouldWrite;
|
|
134
|
+
if (shouldWrite) {
|
|
135
|
+
const line = (0, format_1.formatLogLine)(record);
|
|
136
|
+
this.enqueue(async () => {
|
|
137
|
+
await this.writer.writeLine(line);
|
|
138
|
+
}).catch(noop);
|
|
139
|
+
}
|
|
140
|
+
return serializedArgs;
|
|
141
|
+
}
|
|
142
|
+
getConsoleEchoArgs(rawArgs, serializedArgs, sanitizeAll) {
|
|
143
|
+
if (sanitizeAll || rawArgs.some((item) => hasMaskedValue(item))) {
|
|
144
|
+
return serializedArgs;
|
|
145
|
+
}
|
|
146
|
+
return rawArgs;
|
|
147
|
+
}
|
|
148
|
+
log(...args) {
|
|
149
|
+
const serializedArgs = this.captureRecord("log", "logger", "log", args);
|
|
150
|
+
this.originalConsole.log(...serializedArgs);
|
|
151
|
+
}
|
|
152
|
+
info(...args) {
|
|
153
|
+
const serializedArgs = this.captureRecord("info", "logger", "info", args);
|
|
154
|
+
this.originalConsole.info(...serializedArgs);
|
|
155
|
+
}
|
|
156
|
+
warn(...args) {
|
|
157
|
+
const serializedArgs = this.captureRecord("warn", "logger", "warn", args);
|
|
158
|
+
this.originalConsole.warn(...serializedArgs);
|
|
159
|
+
}
|
|
160
|
+
error(...args) {
|
|
161
|
+
const serializedArgs = this.captureRecord("error", "logger", "error", args);
|
|
162
|
+
this.originalConsole.error(...serializedArgs);
|
|
163
|
+
}
|
|
164
|
+
debug(...args) {
|
|
165
|
+
const serializedArgs = this.captureRecord("debug", "logger", "debug", args);
|
|
166
|
+
this.originalConsole.debug(...serializedArgs);
|
|
167
|
+
}
|
|
168
|
+
trace(...args) {
|
|
169
|
+
const traceStack = new Error("[logger.trace]").stack;
|
|
170
|
+
const serializedArgs = this.captureRecord("trace", "logger", "trace", args, {
|
|
171
|
+
traceStack,
|
|
172
|
+
});
|
|
173
|
+
this.originalConsole.trace(...serializedArgs);
|
|
174
|
+
}
|
|
175
|
+
installConsoleCapture(consoleTarget = console) {
|
|
176
|
+
if (this.consoleCaptureInstalled) {
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
this.consoleCaptureInstalled = true;
|
|
180
|
+
consoleTarget.log = (...args) => {
|
|
181
|
+
if (!this.shouldCaptureConsole()) {
|
|
182
|
+
this.originalConsole.log(...args);
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
const serializedArgs = this.captureRecord("log", "console", "log", args);
|
|
186
|
+
this.originalConsole.log(...this.getConsoleEchoArgs(args, serializedArgs, false));
|
|
187
|
+
};
|
|
188
|
+
consoleTarget.info = (...args) => {
|
|
189
|
+
if (!this.shouldCaptureConsole()) {
|
|
190
|
+
this.originalConsole.info(...args);
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
const serializedArgs = this.captureRecord("info", "console", "info", args);
|
|
194
|
+
this.originalConsole.info(...this.getConsoleEchoArgs(args, serializedArgs, false));
|
|
195
|
+
};
|
|
196
|
+
consoleTarget.warn = (...args) => {
|
|
197
|
+
if (!this.shouldCaptureConsole()) {
|
|
198
|
+
this.originalConsole.warn(...args);
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
const serializedArgs = this.captureRecord("warn", "console", "warn", args);
|
|
202
|
+
this.originalConsole.warn(...this.getConsoleEchoArgs(args, serializedArgs, false));
|
|
203
|
+
};
|
|
204
|
+
consoleTarget.error = (...args) => {
|
|
205
|
+
if (!this.shouldCaptureConsole()) {
|
|
206
|
+
this.originalConsole.error(...args);
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
const serializedArgs = this.captureRecord("error", "console", "error", args);
|
|
210
|
+
this.originalConsole.error(...this.getConsoleEchoArgs(args, serializedArgs, false));
|
|
211
|
+
};
|
|
212
|
+
consoleTarget.debug = (...args) => {
|
|
213
|
+
if (!this.shouldCaptureConsole()) {
|
|
214
|
+
this.originalConsole.debug(...args);
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
const serializedArgs = this.captureRecord("debug", "console", "debug", args);
|
|
218
|
+
this.originalConsole.debug(...this.getConsoleEchoArgs(args, serializedArgs, false));
|
|
219
|
+
};
|
|
220
|
+
consoleTarget.trace = (...args) => {
|
|
221
|
+
if (!this.shouldCaptureConsole()) {
|
|
222
|
+
this.originalConsole.trace(...args);
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
const traceStack = new Error("[console.trace]").stack;
|
|
226
|
+
const serializedArgs = this.captureRecord("trace", "console", "trace", args, { traceStack });
|
|
227
|
+
this.originalConsole.trace(...this.getConsoleEchoArgs(args, serializedArgs, false));
|
|
228
|
+
};
|
|
229
|
+
consoleTarget.time = (label) => {
|
|
230
|
+
const timerLabel = label || "default";
|
|
231
|
+
if (!this.shouldCaptureConsole()) {
|
|
232
|
+
this.originalConsole.time(timerLabel);
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
this.timers.set(timerLabel, this.now().getTime());
|
|
236
|
+
this.captureRecord("debug", "console", "time", [`[timer:start] ${timerLabel}`], {
|
|
237
|
+
label: timerLabel,
|
|
238
|
+
});
|
|
239
|
+
this.originalConsole.time(timerLabel);
|
|
240
|
+
};
|
|
241
|
+
consoleTarget.timeLog = (label, ...args) => {
|
|
242
|
+
const timerLabel = label || "default";
|
|
243
|
+
if (!this.shouldCaptureConsole()) {
|
|
244
|
+
this.originalConsole.timeLog(timerLabel, ...args);
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
const startedAt = this.timers.get(timerLabel);
|
|
248
|
+
const durationMs = typeof startedAt === "number" ? this.now().getTime() - startedAt : null;
|
|
249
|
+
const computedArgs = [`${timerLabel}: ${durationMs !== null && durationMs !== void 0 ? durationMs : "unknown"}ms`, ...args];
|
|
250
|
+
const serializedArgs = this.captureRecord("info", "console", "timeLog", computedArgs, {
|
|
251
|
+
label: timerLabel,
|
|
252
|
+
durationMs,
|
|
253
|
+
});
|
|
254
|
+
this.originalConsole.timeLog(timerLabel, ...this.getConsoleEchoArgs(computedArgs, serializedArgs, false).slice(1));
|
|
255
|
+
};
|
|
256
|
+
consoleTarget.timeEnd = (label) => {
|
|
257
|
+
const timerLabel = label || "default";
|
|
258
|
+
if (!this.shouldCaptureConsole()) {
|
|
259
|
+
this.timers.delete(timerLabel);
|
|
260
|
+
this.originalConsole.timeEnd(timerLabel);
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
const startedAt = this.timers.get(timerLabel);
|
|
264
|
+
const durationMs = typeof startedAt === "number" ? this.now().getTime() - startedAt : null;
|
|
265
|
+
this.timers.delete(timerLabel);
|
|
266
|
+
const computedArgs = [`${timerLabel}: ${durationMs !== null && durationMs !== void 0 ? durationMs : "unknown"}ms`];
|
|
267
|
+
const serializedArgs = this.captureRecord("info", "console", "timeEnd", computedArgs, {
|
|
268
|
+
label: timerLabel,
|
|
269
|
+
durationMs,
|
|
270
|
+
});
|
|
271
|
+
this.originalConsole.timeEnd(timerLabel);
|
|
272
|
+
if (!startedAt) {
|
|
273
|
+
this.originalConsole.info(...serializedArgs);
|
|
274
|
+
}
|
|
275
|
+
};
|
|
276
|
+
consoleTarget.assert = (...args) => {
|
|
277
|
+
const [condition, ...restArgs] = args;
|
|
278
|
+
if (!this.shouldCaptureConsole() || condition) {
|
|
279
|
+
this.originalConsole.assert(condition, ...restArgs);
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
const actualArgs = restArgs.length ? restArgs : ["Assertion failed"];
|
|
283
|
+
const serializedArgs = this.captureRecord("error", "console", "assert", actualArgs);
|
|
284
|
+
this.originalConsole.assert(false, ...this.getConsoleEchoArgs(actualArgs, serializedArgs, false));
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
handlePolicyChange() {
|
|
288
|
+
const nextEnabled = this.shouldWriteToFile();
|
|
289
|
+
if (this.lastWriteEnabled && !nextEnabled) {
|
|
290
|
+
this.lastWriteEnabled = nextEnabled;
|
|
291
|
+
return this.enqueue(async () => {
|
|
292
|
+
await this.writer.finalizeArchive();
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
this.lastWriteEnabled = nextEnabled;
|
|
296
|
+
return Promise.resolve();
|
|
297
|
+
}
|
|
298
|
+
handleAppStateChange(nextState) {
|
|
299
|
+
if (nextState === "active") {
|
|
300
|
+
return Promise.resolve(null);
|
|
301
|
+
}
|
|
302
|
+
return this.enqueue(async () => this.writer.finalizeArchive());
|
|
303
|
+
}
|
|
304
|
+
flush() {
|
|
305
|
+
return this.enqueue(async () => {
|
|
306
|
+
await this.writer.flush();
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
finalizeArchive() {
|
|
310
|
+
return this.enqueue(async () => this.writer.finalizeArchive());
|
|
311
|
+
}
|
|
312
|
+
getState() {
|
|
313
|
+
return {
|
|
314
|
+
...this.writer.getState(),
|
|
315
|
+
runtimeEnv: this.runtimeEnv,
|
|
316
|
+
sessionId: this.sessionId,
|
|
317
|
+
effectiveFileLoggingEnabled: this.shouldWriteToFile(),
|
|
318
|
+
effectiveConsoleCaptureEnabled: this.shouldCaptureConsole(),
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
exports.AppLogger = AppLogger;
|
|
323
|
+
//# sourceMappingURL=core.js.map
|
package/dist/core.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":";;;AAAA,qCASkB;AAuDlB,MAAM,IAAI,GAAG,CAAC,GAAG,KAAgB,EAAE,EAAE,GAAE,CAAC,CAAC;AAEzC,SAAS,iBAAiB,CACxB,OAAgB,EAChB,KAAc;IAEd,IAAI,OAAO,KAAK,KAAK,UAAU,EAAE,CAAC;QAChC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,OAAO,CAAiC,CAAC;AAC7D,CAAC;AAED,SAAS,cAAc,CACrB,KAAc,EACd,OAAwB,IAAI,OAAO,EAAE,EACrC,KAAK,GAAG,CAAC;IAET,IAAI,KAAK,YAAY,uBAAc,EAAE,CAAC;QACpC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACxC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;QACpB,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAEhB,IAAI,KAAK,IAAI,CAAC,EAAE,CAAC;QACf,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KAAK,IAAI,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE,CAAC,CAAC;IACjE,CAAC;IAED,KAAK;QACH,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE;YAC7B,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QAC5B,CAAC,CAAC,CAAC;IACL,CAAC;IAED,eAAe;QACb,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE,CAAC,CAAC;IACjE,CAAC;IAED,QAAQ;QACN,OAAO;YACL,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;YACzB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,2BAA2B,EAAE,IAAI,CAAC,iBAAiB,EAAE;YACrD,8BAA8B,EAAE,IAAI,CAAC,oBAAoB,EAAE;SAC5D,CAAC;IACJ,CAAC;CACF;AA3bD,8BA2bC"}
|
package/dist/format.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export type AppLogLevel = "log" | "info" | "warn" | "error" | "debug" | "trace";
|
|
2
|
+
export declare class MaskedLogValue<T = unknown> {
|
|
3
|
+
readonly value: T;
|
|
4
|
+
constructor(value: T);
|
|
5
|
+
}
|
|
6
|
+
export type SerializableLogValue = null | boolean | number | string | SerializableLogValue[] | {
|
|
7
|
+
[key: string]: SerializableLogValue;
|
|
8
|
+
};
|
|
9
|
+
export type FormattedLogRecord = {
|
|
10
|
+
timestamp: string;
|
|
11
|
+
level: AppLogLevel;
|
|
12
|
+
source: string;
|
|
13
|
+
method: string;
|
|
14
|
+
env: string;
|
|
15
|
+
sessionId: string;
|
|
16
|
+
sequence: number;
|
|
17
|
+
platform?: string;
|
|
18
|
+
body: {
|
|
19
|
+
message: string;
|
|
20
|
+
args: SerializableLogValue[];
|
|
21
|
+
meta?: SerializableLogValue;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export declare function serializeLogValue(value: unknown, seen?: WeakSet<object>, depth?: number, maxDepth?: number): SerializableLogValue;
|
|
25
|
+
export declare function buildInlineMessageFromArgs(args: SerializableLogValue[]): string;
|
|
26
|
+
export declare function serializeLogArgs(args: unknown[]): SerializableLogValue[];
|
|
27
|
+
export declare function formatLogLine(record: FormattedLogRecord): string;
|
|
28
|
+
export declare function formatDateFolder(date: Date): string;
|
|
29
|
+
export declare function formatFileTimestamp(date: Date): string;
|
|
30
|
+
export declare function createDefaultSessionId(date?: Date): string;
|
|
31
|
+
//# sourceMappingURL=format.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../src/format.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;AAEhF,qBAAa,cAAc,CAAC,CAAC,GAAG,OAAO;IACzB,QAAQ,CAAC,KAAK,EAAE,CAAC;gBAAR,KAAK,EAAE,CAAC;CAC9B;AAED,MAAM,MAAM,oBAAoB,GAC5B,IAAI,GACJ,OAAO,GACP,MAAM,GACN,MAAM,GACN,oBAAoB,EAAE,GACtB;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,oBAAoB,CAAA;CAAE,CAAC;AAE5C,MAAM,MAAM,kBAAkB,GAAG;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,WAAW,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE;QACJ,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,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