@blixis-io/logging 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +21 -2
- package/dist/index.d.ts +77 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +119 -0
- package/dist/index.js.map +1 -0
- package/package.json +39 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Michael Voeten
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
-
#
|
|
1
|
+
# `@blixis-io/logging`
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A multi-transport logger, injectable like any other provider. Doesn't depend on `@blixis-io/http` — usable in any app, HTTP or not.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install @blixis-io/logging @blixis-io/core @blixis-io/di
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { createLogger, consoleTransport } from "@blixis-io/logging";
|
|
11
|
+
|
|
12
|
+
const logger = createLogger({
|
|
13
|
+
transports: [consoleTransport()],
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
logger.info("post created", { postId: post.id });
|
|
17
|
+
logger.error("save failed", { error: err, postId: post.id });
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Every log entry fans out to every configured transport at once — each with its own independent `minLevel` — instead of one swappable backend. A real app usually wants console *and* an error tracker *and* maybe a Slack ping, simultaneously.
|
|
21
|
+
|
|
22
|
+
Part of [Blixis Framework](https://github.com/blixis-io/framework) — full docs: [Logging](https://blixis-io.github.io/framework/concepts/logging/) · [API reference](https://blixis-io.github.io/framework/reference/blixis-logging/).
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { DynamicModule } from "@blixis-io/core";
|
|
2
|
+
import { InjectionToken } from "@blixis-io/di";
|
|
3
|
+
//#region src/levels.d.ts
|
|
4
|
+
export declare const LOG_LEVELS: readonly ["trace", "debug", "info", "warn", "error", "fatal"];
|
|
5
|
+
type LogLevel = (typeof LOG_LEVELS)[number];
|
|
6
|
+
export declare function levelSeverity(level: LogLevel): number;
|
|
7
|
+
export declare function isLevelEnabled(level: LogLevel, minLevel: LogLevel): boolean;
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region src/types.d.ts
|
|
10
|
+
interface LogRecord {
|
|
11
|
+
readonly level: LogLevel;
|
|
12
|
+
readonly message: string;
|
|
13
|
+
readonly timestamp: string;
|
|
14
|
+
/**
|
|
15
|
+
* Structured metadata bound to this entry. An attached `Error` goes under
|
|
16
|
+
* the `error` key by convention — transports that care (Sentry, etc.)
|
|
17
|
+
* look for it there rather than a dedicated parameter, so every level
|
|
18
|
+
* keeps the same `(message, context?)` signature.
|
|
19
|
+
*/
|
|
20
|
+
readonly context: Readonly<Record<string, unknown>>;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* A log destination. `log()` may be async (a network call to Sentry/Slack/
|
|
24
|
+
* Logstash); `createLogger()` never awaits it — a slow or failing transport
|
|
25
|
+
* must never block or crash the caller of `logger.info(...)`.
|
|
26
|
+
*/
|
|
27
|
+
interface Transport {
|
|
28
|
+
/** Entries below this level are never passed to `log()`. Default: `"trace"` (everything). */
|
|
29
|
+
minLevel?: LogLevel | undefined;
|
|
30
|
+
log(record: LogRecord): void | Promise<void>;
|
|
31
|
+
}
|
|
32
|
+
interface Logger {
|
|
33
|
+
trace(message: string, context?: Record<string, unknown>): void;
|
|
34
|
+
debug(message: string, context?: Record<string, unknown>): void;
|
|
35
|
+
info(message: string, context?: Record<string, unknown>): void;
|
|
36
|
+
warn(message: string, context?: Record<string, unknown>): void;
|
|
37
|
+
error(message: string, context?: Record<string, unknown>): void;
|
|
38
|
+
fatal(message: string, context?: Record<string, unknown>): void;
|
|
39
|
+
/** A logger that merges `context` into every entry's context, on top of this logger's own bound context. */
|
|
40
|
+
child(context: Record<string, unknown>): Logger;
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
//#region src/logger.d.ts
|
|
44
|
+
interface CreateLoggerOptions {
|
|
45
|
+
transports: Transport[];
|
|
46
|
+
/** Floor below which nothing reaches any transport, regardless of each transport's own minLevel. Default: `"trace"`. */
|
|
47
|
+
minLevel?: LogLevel;
|
|
48
|
+
/** Bound context merged into every entry; extend per call-site with the second argument, or scope it with `child()`. */
|
|
49
|
+
context?: Record<string, unknown>;
|
|
50
|
+
}
|
|
51
|
+
/** Builds a `Logger` that fans every entry out to each transport (filtered by that transport's own `minLevel`), never awaiting or letting a transport failure propagate. */
|
|
52
|
+
export declare function createLogger(options: CreateLoggerOptions): Logger;
|
|
53
|
+
//#endregion
|
|
54
|
+
//#region src/module.d.ts
|
|
55
|
+
export declare const LOGGER: InjectionToken<Logger>;
|
|
56
|
+
/**
|
|
57
|
+
* `LoggerModule.forRoot({ transports: [...] })` builds one `Logger` and
|
|
58
|
+
* provides it under `LOGGER` for the whole app to `@Inject`. `global: true`
|
|
59
|
+
* so every module can inject it without also having to import
|
|
60
|
+
* `LoggerModule` itself — logging is cross-cutting infra, not a feature
|
|
61
|
+
* dependency.
|
|
62
|
+
*/
|
|
63
|
+
export declare class LoggerModule {
|
|
64
|
+
static forRoot(options: CreateLoggerOptions): DynamicModule;
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region src/transports/console.d.ts
|
|
68
|
+
interface ConsoleTransportOptions {
|
|
69
|
+
minLevel?: LogLevel;
|
|
70
|
+
/** Write each record as one JSON line instead of a human-readable one — friendlier to log aggregators. Default: `false`. */
|
|
71
|
+
json?: boolean;
|
|
72
|
+
}
|
|
73
|
+
/** The default transport: writes to `console`, routed by level (`fatal` also goes to `console.error`, there's no more-severe console method). */
|
|
74
|
+
export declare function consoleTransport(options?: ConsoleTransportOptions): Transport;
|
|
75
|
+
//#endregion
|
|
76
|
+
export type { ConsoleTransportOptions, CreateLoggerOptions, LogLevel, LogRecord, Logger, Transport };
|
|
77
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/levels.ts","../src/types.ts","../src/logger.ts","../src/module.ts","../src/transports/console.ts"],"mappings":";;;qBAAa;KAED,mBAAmB;wBAEf,cAAc,OAAO;wBAIrB,eAAe,OAAO,UAAU,UAAU;;;UCNzC;WACN,OAAO;WACP;WACA;;;;;;;WAOA,SAAS,SAAS;;;;;;;UAQZ;;EAEf,WAAW;EACX,IAAI,QAAQ,mBAAmB;;UAGhB;EACf,MAAM,iBAAiB,UAAU;EACjC,MAAM,iBAAiB,UAAU;EACjC,KAAK,iBAAiB,UAAU;EAChC,KAAK,iBAAiB,UAAU;EAChC,MAAM,iBAAiB,UAAU;EACjC,MAAM,iBAAiB,UAAU;;EAEjC,MAAM,SAAS,0BAA0B;;;;UC/B1B;EACf,YAAY;;EAEZ,WAAW;;EAEX,UAAU;;;wBA0DI,aAAa,SAAS,sBAAsB;;;qBC7D/C,QAAM,eAAA;;;;;;;;qBAUN;SACJ,QAAQ,SAAS,sBAAsB;;;;UCb/B;EACf,WAAW;;EAEX;;;wBAkBc,iBAAiB,UAAS,0BAA+B"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { Module } from "@blixis-io/core";
|
|
2
|
+
import { InjectionToken } from "@blixis-io/di";
|
|
3
|
+
//#region src/levels.ts
|
|
4
|
+
const LOG_LEVELS = [
|
|
5
|
+
"trace",
|
|
6
|
+
"debug",
|
|
7
|
+
"info",
|
|
8
|
+
"warn",
|
|
9
|
+
"error",
|
|
10
|
+
"fatal"
|
|
11
|
+
];
|
|
12
|
+
function levelSeverity(level) {
|
|
13
|
+
return LOG_LEVELS.indexOf(level);
|
|
14
|
+
}
|
|
15
|
+
function isLevelEnabled(level, minLevel) {
|
|
16
|
+
return levelSeverity(level) >= levelSeverity(minLevel);
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region src/logger.ts
|
|
20
|
+
const DEFAULT_MIN_LEVEL = "trace";
|
|
21
|
+
function reportTransportFailure(error) {
|
|
22
|
+
console.error("[@blixis-io/logging] a transport failed:", error);
|
|
23
|
+
}
|
|
24
|
+
function emit(transports, globalMinLevel, level, message, context) {
|
|
25
|
+
if (!isLevelEnabled(level, globalMinLevel)) return;
|
|
26
|
+
const record = {
|
|
27
|
+
level,
|
|
28
|
+
message,
|
|
29
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
30
|
+
context
|
|
31
|
+
};
|
|
32
|
+
for (const transport of transports) {
|
|
33
|
+
if (!isLevelEnabled(level, transport.minLevel ?? DEFAULT_MIN_LEVEL)) continue;
|
|
34
|
+
try {
|
|
35
|
+
const result = transport.log(record);
|
|
36
|
+
if (result instanceof Promise) result.catch(reportTransportFailure);
|
|
37
|
+
} catch (error) {
|
|
38
|
+
reportTransportFailure(error);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function buildLogger(transports, globalMinLevel, boundContext) {
|
|
43
|
+
const log = (level) => (message, context = {}) => {
|
|
44
|
+
emit(transports, globalMinLevel, level, message, {
|
|
45
|
+
...boundContext,
|
|
46
|
+
...context
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
return {
|
|
50
|
+
trace: log("trace"),
|
|
51
|
+
debug: log("debug"),
|
|
52
|
+
info: log("info"),
|
|
53
|
+
warn: log("warn"),
|
|
54
|
+
error: log("error"),
|
|
55
|
+
fatal: log("fatal"),
|
|
56
|
+
child: (context) => buildLogger(transports, globalMinLevel, {
|
|
57
|
+
...boundContext,
|
|
58
|
+
...context
|
|
59
|
+
})
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
/** Builds a `Logger` that fans every entry out to each transport (filtered by that transport's own `minLevel`), never awaiting or letting a transport failure propagate. */
|
|
63
|
+
function createLogger(options) {
|
|
64
|
+
return buildLogger(options.transports, options.minLevel ?? DEFAULT_MIN_LEVEL, options.context ?? {});
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region \0@oxc-project+runtime@0.151.0/helpers/esm/decorate.js
|
|
68
|
+
function __decorate(decorators, target, key, desc) {
|
|
69
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
70
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
71
|
+
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;
|
|
72
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
73
|
+
}
|
|
74
|
+
//#endregion
|
|
75
|
+
//#region src/module.ts
|
|
76
|
+
var _LoggerModule;
|
|
77
|
+
const LOGGER = new InjectionToken("blixis.logger");
|
|
78
|
+
let LoggerModule = _LoggerModule = class LoggerModule {
|
|
79
|
+
static forRoot(options) {
|
|
80
|
+
return {
|
|
81
|
+
module: _LoggerModule,
|
|
82
|
+
providers: [{
|
|
83
|
+
provide: LOGGER,
|
|
84
|
+
useFactory: () => createLogger(options)
|
|
85
|
+
}],
|
|
86
|
+
exports: [LOGGER],
|
|
87
|
+
global: true
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
LoggerModule = _LoggerModule = __decorate([Module()], LoggerModule);
|
|
92
|
+
//#endregion
|
|
93
|
+
//#region src/transports/console.ts
|
|
94
|
+
const CONSOLE_METHOD = {
|
|
95
|
+
trace: "log",
|
|
96
|
+
debug: "debug",
|
|
97
|
+
info: "info",
|
|
98
|
+
warn: "warn",
|
|
99
|
+
error: "error",
|
|
100
|
+
fatal: "error"
|
|
101
|
+
};
|
|
102
|
+
function formatHuman(record) {
|
|
103
|
+
const base = `${record.timestamp} ${record.level.toUpperCase()} ${record.message}`;
|
|
104
|
+
return Object.keys(record.context).length > 0 ? `${base} ${JSON.stringify(record.context)}` : base;
|
|
105
|
+
}
|
|
106
|
+
/** The default transport: writes to `console`, routed by level (`fatal` also goes to `console.error`, there's no more-severe console method). */
|
|
107
|
+
function consoleTransport(options = {}) {
|
|
108
|
+
return {
|
|
109
|
+
minLevel: options.minLevel,
|
|
110
|
+
log(record) {
|
|
111
|
+
const line = options.json ? JSON.stringify(record) : formatHuman(record);
|
|
112
|
+
console[CONSOLE_METHOD[record.level]](line);
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
//#endregion
|
|
117
|
+
export { LOGGER, LOG_LEVELS, LoggerModule, consoleTransport, createLogger, isLevelEnabled, levelSeverity };
|
|
118
|
+
|
|
119
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/levels.ts","../src/logger.ts","../src/module.ts","../src/transports/console.ts"],"sourcesContent":["export const LOG_LEVELS = [\"trace\", \"debug\", \"info\", \"warn\", \"error\", \"fatal\"] as const;\n\nexport type LogLevel = (typeof LOG_LEVELS)[number];\n\nexport function levelSeverity(level: LogLevel): number {\n return LOG_LEVELS.indexOf(level);\n}\n\nexport function isLevelEnabled(level: LogLevel, minLevel: LogLevel): boolean {\n return levelSeverity(level) >= levelSeverity(minLevel);\n}\n","import { isLevelEnabled, type LogLevel } from \"./levels.js\";\nimport type { Logger, LogRecord, Transport } from \"./types.js\";\n\nexport interface CreateLoggerOptions {\n transports: Transport[];\n /** Floor below which nothing reaches any transport, regardless of each transport's own minLevel. Default: `\"trace\"`. */\n minLevel?: LogLevel;\n /** Bound context merged into every entry; extend per call-site with the second argument, or scope it with `child()`. */\n context?: Record<string, unknown>;\n}\n\nconst DEFAULT_MIN_LEVEL: LogLevel = \"trace\";\n\nfunction reportTransportFailure(error: unknown): void {\n // The one place this package uses console directly: a transport failing\n // must never crash or silently swallow the caller's own logging.\n console.error(\"[@blixis-io/logging] a transport failed:\", error);\n}\n\nfunction emit(\n transports: readonly Transport[],\n globalMinLevel: LogLevel,\n level: LogLevel,\n message: string,\n context: Record<string, unknown>,\n): void {\n if (!isLevelEnabled(level, globalMinLevel)) {\n return;\n }\n\n const record: LogRecord = { level, message, timestamp: new Date().toISOString(), context };\n\n for (const transport of transports) {\n if (!isLevelEnabled(level, transport.minLevel ?? DEFAULT_MIN_LEVEL)) {\n continue;\n }\n try {\n const result = transport.log(record);\n if (result instanceof Promise) {\n result.catch(reportTransportFailure);\n }\n } catch (error) {\n reportTransportFailure(error);\n }\n }\n}\n\nfunction buildLogger(transports: readonly Transport[], globalMinLevel: LogLevel, boundContext: Record<string, unknown>): Logger {\n const log =\n (level: LogLevel) =>\n (message: string, context: Record<string, unknown> = {}): void => {\n emit(transports, globalMinLevel, level, message, { ...boundContext, ...context });\n };\n\n return {\n trace: log(\"trace\"),\n debug: log(\"debug\"),\n info: log(\"info\"),\n warn: log(\"warn\"),\n error: log(\"error\"),\n fatal: log(\"fatal\"),\n child: (context) => buildLogger(transports, globalMinLevel, { ...boundContext, ...context }),\n };\n}\n\n/** Builds a `Logger` that fans every entry out to each transport (filtered by that transport's own `minLevel`), never awaiting or letting a transport failure propagate. */\nexport function createLogger(options: CreateLoggerOptions): Logger {\n return buildLogger(options.transports, options.minLevel ?? DEFAULT_MIN_LEVEL, options.context ?? {});\n}\n","import { Module, type DynamicModule } from \"@blixis-io/core\";\nimport { InjectionToken } from \"@blixis-io/di\";\nimport { createLogger, type CreateLoggerOptions } from \"./logger.js\";\nimport type { Logger } from \"./types.js\";\n\nexport const LOGGER = new InjectionToken<Logger>(\"blixis.logger\");\n\n/**\n * `LoggerModule.forRoot({ transports: [...] })` builds one `Logger` and\n * provides it under `LOGGER` for the whole app to `@Inject`. `global: true`\n * so every module can inject it without also having to import\n * `LoggerModule` itself — logging is cross-cutting infra, not a feature\n * dependency.\n */\n@Module()\nexport class LoggerModule {\n static forRoot(options: CreateLoggerOptions): DynamicModule {\n return {\n module: LoggerModule,\n providers: [{ provide: LOGGER, useFactory: () => createLogger(options) }],\n exports: [LOGGER],\n global: true,\n };\n }\n}\n","import type { LogLevel } from \"../levels.js\";\nimport type { LogRecord, Transport } from \"../types.js\";\n\nexport interface ConsoleTransportOptions {\n minLevel?: LogLevel;\n /** Write each record as one JSON line instead of a human-readable one — friendlier to log aggregators. Default: `false`. */\n json?: boolean;\n}\n\nconst CONSOLE_METHOD = {\n trace: \"log\",\n debug: \"debug\",\n info: \"info\",\n warn: \"warn\",\n error: \"error\",\n fatal: \"error\",\n} as const satisfies Record<LogLevel, \"log\" | \"debug\" | \"info\" | \"warn\" | \"error\">;\n\nfunction formatHuman(record: LogRecord): string {\n const base = `${record.timestamp} ${record.level.toUpperCase()} ${record.message}`;\n return Object.keys(record.context).length > 0 ? `${base} ${JSON.stringify(record.context)}` : base;\n}\n\n/** The default transport: writes to `console`, routed by level (`fatal` also goes to `console.error`, there's no more-severe console method). */\nexport function consoleTransport(options: ConsoleTransportOptions = {}): Transport {\n return {\n minLevel: options.minLevel,\n log(record) {\n const line = options.json ? JSON.stringify(record) : formatHuman(record);\n console[CONSOLE_METHOD[record.level]](line);\n },\n };\n}\n"],"mappings":";;;AAAA,MAAa,aAAa;CAAC;CAAS;CAAS;CAAQ;CAAQ;CAAS;AAAO;AAI7E,SAAgB,cAAc,OAAyB;CACrD,OAAO,WAAW,QAAQ,KAAK;AACjC;AAEA,SAAgB,eAAe,OAAiB,UAA6B;CAC3E,OAAO,cAAc,KAAK,KAAK,cAAc,QAAQ;AACvD;;;ACCA,MAAM,oBAA8B;AAEpC,SAAS,uBAAuB,OAAsB;CAGpD,QAAQ,MAAM,4CAA4C,KAAK;AACjE;AAEA,SAAS,KACP,YACA,gBACA,OACA,SACA,SACM;CACN,IAAI,CAAC,eAAe,OAAO,cAAc,GACvC;CAGF,MAAM,SAAoB;EAAE;EAAO;EAAS,4BAAW,IAAI,KAAK,EAAA,CAAE,YAAY;EAAG;CAAQ;CAEzF,KAAK,MAAM,aAAa,YAAY;EAClC,IAAI,CAAC,eAAe,OAAO,UAAU,YAAY,iBAAiB,GAChE;EAEF,IAAI;GACF,MAAM,SAAS,UAAU,IAAI,MAAM;GACnC,IAAI,kBAAkB,SACpB,OAAO,MAAM,sBAAsB;EAEvC,SAAS,OAAO;GACd,uBAAuB,KAAK;EAC9B;CACF;AACF;AAEA,SAAS,YAAY,YAAkC,gBAA0B,cAA+C;CAC9H,MAAM,OACH,WACA,SAAiB,UAAmC,CAAC,MAAY;EAChE,KAAK,YAAY,gBAAgB,OAAO,SAAS;GAAE,GAAG;GAAc,GAAG;EAAQ,CAAC;CAClF;CAEF,OAAO;EACL,OAAO,IAAI,OAAO;EAClB,OAAO,IAAI,OAAO;EAClB,MAAM,IAAI,MAAM;EAChB,MAAM,IAAI,MAAM;EAChB,OAAO,IAAI,OAAO;EAClB,OAAO,IAAI,OAAO;EAClB,QAAQ,YAAY,YAAY,YAAY,gBAAgB;GAAE,GAAG;GAAc,GAAG;EAAQ,CAAC;CAC7F;AACF;;AAGA,SAAgB,aAAa,SAAsC;CACjE,OAAO,YAAY,QAAQ,YAAY,QAAQ,YAAY,mBAAmB,QAAQ,WAAW,CAAC,CAAC;AACrG;;;;;;;;;;;;AC/DA,MAAa,SAAS,IAAI,eAAuB,eAAe;AAUzD,IAAM,eAAA,gBAAN,MAAM,aAAa;CACxB,OAAO,QAAQ,SAA6C;EAC1D,OAAO;GACL,QAAA;GACA,WAAW,CAAC;IAAE,SAAS;IAAQ,kBAAkB,aAAa,OAAO;GAAE,CAAC;GACxE,SAAS,CAAC,MAAM;GAChB,QAAQ;EACV;CACF;AACF;AAVC,eAAA,gBAAA,WAAA,CAAA,OAAO,CAAA,GAAA,YAAA;;;ACLR,MAAM,iBAAiB;CACrB,OAAO;CACP,OAAO;CACP,MAAM;CACN,MAAM;CACN,OAAO;CACP,OAAO;AACT;AAEA,SAAS,YAAY,QAA2B;CAC9C,MAAM,OAAO,GAAG,OAAO,UAAU,GAAG,OAAO,MAAM,YAAY,EAAE,GAAG,OAAO;CACzE,OAAO,OAAO,KAAK,OAAO,OAAO,CAAC,CAAC,SAAS,IAAI,GAAG,KAAK,GAAG,KAAK,UAAU,OAAO,OAAO,MAAM;AAChG;;AAGA,SAAgB,iBAAiB,UAAmC,CAAC,GAAc;CACjF,OAAO;EACL,UAAU,QAAQ;EAClB,IAAI,QAAQ;GACV,MAAM,OAAO,QAAQ,OAAO,KAAK,UAAU,MAAM,IAAI,YAAY,MAAM;GACvE,QAAQ,eAAe,OAAO,OAAO,CAAC,IAAI;EAC5C;CACF;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blixis-io/logging",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "A multi-transport logger, injectable like any other provider. Doesn't depend on @blixis-io/http — usable in any app, HTTP or not.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Michael Voeten <michael@voeten.online>",
|
|
7
|
+
"homepage": "https://blixis-io.github.io/framework/",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/blixis-io/framework.git",
|
|
11
|
+
"directory": "packages/logging"
|
|
12
|
+
},
|
|
13
|
+
"type": "module",
|
|
14
|
+
"engines": {
|
|
15
|
+
"node": ">=24"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"logging",
|
|
19
|
+
"typescript"
|
|
20
|
+
],
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public"
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"dist"
|
|
26
|
+
],
|
|
27
|
+
"exports": {
|
|
28
|
+
".": {
|
|
29
|
+
"@blixis-io/source": "./src/index.ts",
|
|
30
|
+
"types": "./dist/index.d.ts",
|
|
31
|
+
"default": "./dist/index.js"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@blixis-io/core": "0.1.0",
|
|
36
|
+
"@blixis-io/di": "0.1.0"
|
|
37
|
+
},
|
|
38
|
+
"scripts": {
|
|
39
|
+
"typecheck": "tsc -p tsconfig.json",
|
|
40
|
+
"build": "rolldown -c"
|
|
41
|
+
}
|
|
6
42
|
}
|