logan-logger 1.0.2 → 1.1.1
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 +47 -14
- package/dist/browser.d.ts +335 -0
- package/dist/browser.esm.js +19 -0
- package/dist/browser.js +1 -0
- package/dist/bun.d.ts +323 -0
- package/dist/bun.esm.js +21 -0
- package/dist/bun.js +1 -0
- package/dist/deno.d.ts +343 -0
- package/dist/deno.esm.js +54 -0
- package/dist/deno.js +1 -0
- package/dist/index.d.ts +0 -16
- package/dist/index.esm.js +34 -664
- package/dist/index.js +1 -1
- package/dist/node-BKsollr4.js +1 -0
- package/dist/node-BqvVrzA_.mjs +626 -0
- package/dist/node.d.ts +190 -0
- package/dist/node.esm.js +7 -0
- package/dist/node.js +1 -0
- package/package.json +21 -1
package/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Logan Logger
|
|
2
2
|
|
|
3
3
|
[](https://github.com/llbbl/logan-logger-ts/actions/workflows/ci.yml)
|
|
4
|
+
[](https://www.npmjs.com/package/logan-logger)
|
|
4
5
|
[](https://jsr.io/@logan/logger)
|
|
5
6
|
|
|
6
7
|
A universal TypeScript logging library that works consistently across all JavaScript runtimes: Node.js, Deno, Bun, browsers, and WebAssembly environments.
|
|
@@ -19,11 +20,17 @@ A universal TypeScript logging library that works consistently across all JavaSc
|
|
|
19
20
|
## Quick Start
|
|
20
21
|
|
|
21
22
|
```bash
|
|
23
|
+
# NPM
|
|
22
24
|
npm install logan-logger
|
|
23
25
|
# or
|
|
24
26
|
pnpm add logan-logger
|
|
25
27
|
# or
|
|
26
28
|
yarn add logan-logger
|
|
29
|
+
|
|
30
|
+
# JSR (Deno/Node.js)
|
|
31
|
+
deno add @logan/logger
|
|
32
|
+
# or
|
|
33
|
+
npx jsr add @logan/logger
|
|
27
34
|
```
|
|
28
35
|
|
|
29
36
|
### Basic Usage
|
|
@@ -70,11 +77,13 @@ const logger = createLoggerForEnvironment();
|
|
|
70
77
|
// Test: WARN level
|
|
71
78
|
```
|
|
72
79
|
|
|
73
|
-
#### Runtime-Specific
|
|
80
|
+
#### Runtime-Specific Imports
|
|
74
81
|
|
|
75
|
-
|
|
82
|
+
Logan Logger provides runtime-specific entry points for optimal bundling and type safety:
|
|
83
|
+
|
|
84
|
+
**🟢 Node.js with Winston Support:**
|
|
76
85
|
```typescript
|
|
77
|
-
import { NodeLogger, createMorganStream } from 'logan-logger';
|
|
86
|
+
import { createLogger, NodeLogger, createMorganStream } from 'logan-logger/node';
|
|
78
87
|
|
|
79
88
|
const logger = new NodeLogger({
|
|
80
89
|
transports: [
|
|
@@ -86,9 +95,9 @@ const logger = new NodeLogger({
|
|
|
86
95
|
app.use(morgan('combined', { stream: createMorganStream(logger) }));
|
|
87
96
|
```
|
|
88
97
|
|
|
89
|
-
|
|
98
|
+
**🌐 Browser-Optimized (Webpack/Vite-Safe):**
|
|
90
99
|
```typescript
|
|
91
|
-
import { PerformanceLogger } from 'logan-logger';
|
|
100
|
+
import { createLogger, BrowserLogger, PerformanceLogger } from 'logan-logger/browser';
|
|
92
101
|
|
|
93
102
|
const logger = new PerformanceLogger();
|
|
94
103
|
|
|
@@ -97,6 +106,30 @@ logger.mark('api-start');
|
|
|
97
106
|
logger.measure('api-duration', 'api-start');
|
|
98
107
|
```
|
|
99
108
|
|
|
109
|
+
**🦕 Deno-Optimized:**
|
|
110
|
+
```typescript
|
|
111
|
+
import { createLogger, BrowserLogger } from 'logan-logger/deno';
|
|
112
|
+
|
|
113
|
+
const logger = createLogger({ colorize: true });
|
|
114
|
+
logger.info('Deno application started');
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**🥟 Bun-Optimized:**
|
|
118
|
+
```typescript
|
|
119
|
+
import { createLogger, NodeLogger } from 'logan-logger/bun';
|
|
120
|
+
|
|
121
|
+
const logger = createLogger({ level: LogLevel.DEBUG });
|
|
122
|
+
logger.info('Bun application started');
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**🔧 Auto-Detection (Generic):**
|
|
126
|
+
```typescript
|
|
127
|
+
import { createLogger } from 'logan-logger';
|
|
128
|
+
|
|
129
|
+
// Automatically selects appropriate logger based on runtime
|
|
130
|
+
const logger = createLogger();
|
|
131
|
+
```
|
|
132
|
+
|
|
100
133
|
#### Safe Data Handling
|
|
101
134
|
```typescript
|
|
102
135
|
import { filterSensitiveData } from 'logan-logger';
|
|
@@ -113,16 +146,16 @@ logger.info('User processed', safeData);
|
|
|
113
146
|
// Logs: { name: 'John Doe', email: 'john@example.com', password: '[REDACTED]', apiKey: '[REDACTED]' }
|
|
114
147
|
```
|
|
115
148
|
|
|
116
|
-
## Runtime Support
|
|
149
|
+
## Runtime Support & Import Paths
|
|
117
150
|
|
|
118
|
-
| Runtime | Status | Implementation | Features |
|
|
119
|
-
|
|
120
|
-
| Node.js 20+ | ✅ Full | Winston + Console | File logging, transports, Morgan integration |
|
|
121
|
-
| Bun | ✅ Full |
|
|
122
|
-
| Browser | ✅ Full | Console API | CSS styling, performance marks, grouping |
|
|
123
|
-
| Deno | ✅ Basic |
|
|
124
|
-
| WebWorker | ✅ Basic | Console adapter | Basic console logging |
|
|
125
|
-
|
|
|
151
|
+
| Runtime | Import Path | Status | Implementation | Features |
|
|
152
|
+
|---------|-------------|--------|----------------|----------|
|
|
153
|
+
| Node.js 20+ | `logan-logger/node` | ✅ Full | Winston + Console | File logging, transports, Morgan integration |
|
|
154
|
+
| Bun | `logan-logger/bun` | ✅ Full | NodeLogger adapter | Same as Node.js |
|
|
155
|
+
| Browser | `logan-logger/browser` | ✅ Full | Console API | CSS styling, performance marks, grouping |
|
|
156
|
+
| Deno | `@logan/logger/deno` (JSR) | ✅ Basic | BrowserLogger adapter | Console logging (native implementation planned) |
|
|
157
|
+
| WebWorker | `logan-logger/browser` | ✅ Basic | Console adapter | Basic console logging |
|
|
158
|
+
| Auto-detect | `logan-logger` | ✅ Basic | Runtime detection | Automatic adapter selection |
|
|
126
159
|
|
|
127
160
|
## Configuration
|
|
128
161
|
|
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
declare abstract class BaseLogger implements ILogger {
|
|
2
|
+
protected level: LogLevel;
|
|
3
|
+
protected config: Partial<LoggerConfig>;
|
|
4
|
+
protected runtime: RuntimeName;
|
|
5
|
+
protected childMetadata: Record<string, any>;
|
|
6
|
+
protected constructor(config?: Partial<LoggerConfig>);
|
|
7
|
+
debug(message: LogMessage, metadata?: any): void;
|
|
8
|
+
info(message: LogMessage, metadata?: any): void;
|
|
9
|
+
warn(message: LogMessage, metadata?: any): void;
|
|
10
|
+
error(message: LogMessage, metadata?: any): void;
|
|
11
|
+
log(level: LogLevel, message: LogMessage, metadata?: any): void;
|
|
12
|
+
setLevel(level: LogLevel): void;
|
|
13
|
+
getLevel(): LogLevel;
|
|
14
|
+
child(metadata: Record<string, any>): ILogger;
|
|
15
|
+
protected shouldLog(level: LogLevel): boolean;
|
|
16
|
+
protected abstract writeLog(entry: LogEntry): void;
|
|
17
|
+
protected abstract createChild(): BaseLogger;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export declare class BrowserLogger extends BaseLogger {
|
|
21
|
+
constructor(config?: Partial<LoggerConfig>);
|
|
22
|
+
protected writeLog(entry: LogEntry): void;
|
|
23
|
+
protected createChild(): BaseLogger;
|
|
24
|
+
private formatMessage;
|
|
25
|
+
private getConsoleStyle;
|
|
26
|
+
private shouldLogInProduction;
|
|
27
|
+
protected shouldLog(level: LogLevel): boolean;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export declare class ConsoleGroupLogger extends BrowserLogger {
|
|
31
|
+
private groupStack;
|
|
32
|
+
group(label: string): void;
|
|
33
|
+
groupCollapsed(label: string): void;
|
|
34
|
+
groupEnd(): void;
|
|
35
|
+
getCurrentGroupStack(): string[];
|
|
36
|
+
getCurrentGroupPath(): string;
|
|
37
|
+
time(label: string): void;
|
|
38
|
+
timeEnd(label: string): void;
|
|
39
|
+
trace(message: string, metadata?: any): void;
|
|
40
|
+
count(label?: string): void;
|
|
41
|
+
countReset(label?: string): void;
|
|
42
|
+
table(data: any): void;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Convenience function for creating a logger instance.
|
|
47
|
+
* @param config - Optional configuration for the logger
|
|
48
|
+
* @returns A logger instance appropriate for the current runtime
|
|
49
|
+
* @example
|
|
50
|
+
* ```typescript
|
|
51
|
+
* import { createLogger, LogLevel } from 'logan-logger';
|
|
52
|
+
*
|
|
53
|
+
* const logger = createLogger({
|
|
54
|
+
* level: LogLevel.DEBUG,
|
|
55
|
+
* colorize: true
|
|
56
|
+
* });
|
|
57
|
+
*
|
|
58
|
+
* logger.info('Hello world!');
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
export declare function createLogger(config?: Partial<LoggerConfig>): ILogger;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Create a logger with configuration based on the current environment.
|
|
65
|
+
* Automatically detects production/development/test environments and
|
|
66
|
+
* sets appropriate log levels and formatting.
|
|
67
|
+
* @returns A logger instance configured for the current environment
|
|
68
|
+
*/
|
|
69
|
+
export declare function createLoggerForEnvironment(): ILogger;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Detects the current JavaScript runtime environment and its capabilities.
|
|
73
|
+
* @returns Information about the detected runtime
|
|
74
|
+
* @example
|
|
75
|
+
* ```typescript
|
|
76
|
+
* const runtime = detectRuntime();
|
|
77
|
+
* console.log(`Running on: ${runtime.name} ${runtime.version}`);
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
export declare function detectRuntime(): RuntimeInfo;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Filter out sensitive data from an object before logging.
|
|
84
|
+
* @param obj - The object to filter
|
|
85
|
+
* @param sensitiveKeys - Array of key names to redact (case-insensitive)
|
|
86
|
+
* @returns A new object with sensitive values replaced with '[REDACTED]'
|
|
87
|
+
* @example
|
|
88
|
+
* ```typescript
|
|
89
|
+
* const data = { username: 'john', password: 'secret123' };
|
|
90
|
+
* const filtered = filterSensitiveData(data);
|
|
91
|
+
* // Result: { username: 'john', password: '[REDACTED]' }
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
export declare function filterSensitiveData(obj: any, sensitiveKeys?: string[]): any;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Format log level as a colored string for terminal output.
|
|
98
|
+
* @param level - The log level to format
|
|
99
|
+
* @param colorize - Whether to apply ANSI color codes
|
|
100
|
+
* @returns Formatted level string with optional colors
|
|
101
|
+
*/
|
|
102
|
+
export declare function formatLevel(level: LogLevel, colorize?: boolean): string;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Format a log entry for output in different formats.
|
|
106
|
+
* @param entry - The log entry to format
|
|
107
|
+
* @param format - Output format ('json' or 'text')
|
|
108
|
+
* @returns Formatted log string
|
|
109
|
+
* @example
|
|
110
|
+
* ```typescript
|
|
111
|
+
* const entry: LogEntry = {
|
|
112
|
+
* timestamp: new Date(),
|
|
113
|
+
* level: LogLevel.INFO,
|
|
114
|
+
* message: 'User logged in',
|
|
115
|
+
* metadata: { userId: 123 },
|
|
116
|
+
* runtime: 'node'
|
|
117
|
+
* };
|
|
118
|
+
*
|
|
119
|
+
* const textFormat = formatLogEntry(entry, 'text');
|
|
120
|
+
* // Result: "[2024-01-01T12:00:00.000Z] INFO: User logged in {\"userId\":123}"
|
|
121
|
+
*
|
|
122
|
+
* const jsonFormat = formatLogEntry(entry, 'json');
|
|
123
|
+
* // Result: {"timestamp":"2024-01-01T12:00:00.000Z","level":"info","message":"User logged in","metadata":{"userId":123},"runtime":"node"}
|
|
124
|
+
* ```
|
|
125
|
+
*/
|
|
126
|
+
export declare function formatLogEntry(entry: LogEntry, format?: 'json' | 'text'): string;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Main logger interface providing methods for logging at different levels.
|
|
130
|
+
* This interface is implemented by all logger implementations across different runtimes.
|
|
131
|
+
*/
|
|
132
|
+
export declare interface ILogger {
|
|
133
|
+
/**
|
|
134
|
+
* Log a debug message. Only shown when log level is DEBUG.
|
|
135
|
+
* @param message - The message to log (string or lazy function)
|
|
136
|
+
* @param metadata - Optional structured data to include
|
|
137
|
+
*/
|
|
138
|
+
debug(message: LogMessage, metadata?: any): void;
|
|
139
|
+
/**
|
|
140
|
+
* Log an informational message.
|
|
141
|
+
* @param message - The message to log (string or lazy function)
|
|
142
|
+
* @param metadata - Optional structured data to include
|
|
143
|
+
*/
|
|
144
|
+
info(message: LogMessage, metadata?: any): void;
|
|
145
|
+
/**
|
|
146
|
+
* Log a warning message.
|
|
147
|
+
* @param message - The message to log (string or lazy function)
|
|
148
|
+
* @param metadata - Optional structured data to include
|
|
149
|
+
*/
|
|
150
|
+
warn(message: LogMessage, metadata?: any): void;
|
|
151
|
+
/**
|
|
152
|
+
* Log an error message.
|
|
153
|
+
* @param message - The message to log (string or lazy function)
|
|
154
|
+
* @param metadata - Optional structured data to include
|
|
155
|
+
*/
|
|
156
|
+
error(message: LogMessage, metadata?: any): void;
|
|
157
|
+
/**
|
|
158
|
+
* Log a message at a specific level.
|
|
159
|
+
* @param level - The log level
|
|
160
|
+
* @param message - The message to log (string or lazy function)
|
|
161
|
+
* @param metadata - Optional structured data to include
|
|
162
|
+
*/
|
|
163
|
+
log(level: LogLevel, message: LogMessage, metadata?: any): void;
|
|
164
|
+
/**
|
|
165
|
+
* Set the minimum log level for this logger.
|
|
166
|
+
* @param level - The minimum log level
|
|
167
|
+
*/
|
|
168
|
+
setLevel(level: LogLevel): void;
|
|
169
|
+
/**
|
|
170
|
+
* Get the current minimum log level.
|
|
171
|
+
* @returns The current log level
|
|
172
|
+
*/
|
|
173
|
+
getLevel(): LogLevel;
|
|
174
|
+
/**
|
|
175
|
+
* Create a child logger with additional metadata.
|
|
176
|
+
* @param metadata - Additional metadata to include in all child log messages
|
|
177
|
+
* @returns A new logger instance with the additional metadata
|
|
178
|
+
*/
|
|
179
|
+
child(metadata: Record<string, any>): ILogger;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Check if the current runtime is a browser.
|
|
184
|
+
* @returns True if running in a browser
|
|
185
|
+
*/
|
|
186
|
+
export declare function isBrowser(): boolean;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Check if the current runtime is Bun.
|
|
190
|
+
* @returns True if running in Bun
|
|
191
|
+
*/
|
|
192
|
+
export declare function isBun(): boolean;
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Check if the current runtime is Deno.
|
|
196
|
+
* @returns True if running in Deno
|
|
197
|
+
*/
|
|
198
|
+
export declare function isDeno(): boolean;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Check if the current runtime is Node.js.
|
|
202
|
+
* @returns True if running in Node.js
|
|
203
|
+
*/
|
|
204
|
+
export declare function isNode(): boolean;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Internal representation of a log entry.
|
|
208
|
+
*/
|
|
209
|
+
declare interface LogEntry {
|
|
210
|
+
/** When the log entry was created */
|
|
211
|
+
timestamp: Date;
|
|
212
|
+
/** Log level of this entry */
|
|
213
|
+
level: LogLevel;
|
|
214
|
+
/** The log message */
|
|
215
|
+
message: string;
|
|
216
|
+
/** Additional structured data */
|
|
217
|
+
metadata?: Record<string, any>;
|
|
218
|
+
/** Runtime that generated this log entry */
|
|
219
|
+
runtime: RuntimeName;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Configuration options for creating a logger instance.
|
|
224
|
+
*/
|
|
225
|
+
export declare interface LoggerConfig {
|
|
226
|
+
/** Minimum log level to output */
|
|
227
|
+
level: LogLevel;
|
|
228
|
+
/** Output format for log messages */
|
|
229
|
+
format: 'json' | 'text' | 'custom';
|
|
230
|
+
/** Whether to include timestamps in log output */
|
|
231
|
+
timestamp: boolean;
|
|
232
|
+
/** Whether to colorize log output (if supported) */
|
|
233
|
+
colorize: boolean;
|
|
234
|
+
/** Default metadata to include with all log messages */
|
|
235
|
+
metadata: Record<string, any>;
|
|
236
|
+
/** Transport configurations for log output */
|
|
237
|
+
transports?: TransportConfig[];
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Log levels in ascending order of severity.
|
|
242
|
+
* Used to filter which messages should be logged.
|
|
243
|
+
*/
|
|
244
|
+
export declare enum LogLevel {
|
|
245
|
+
/** Debug messages - most verbose */
|
|
246
|
+
DEBUG = 0,
|
|
247
|
+
/** Informational messages */
|
|
248
|
+
INFO = 1,
|
|
249
|
+
/** Warning messages */
|
|
250
|
+
WARN = 2,
|
|
251
|
+
/** Error messages */
|
|
252
|
+
ERROR = 3,
|
|
253
|
+
/** No messages - silent mode */
|
|
254
|
+
SILENT = 4
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* A log message can be a string or a function that returns a string.
|
|
259
|
+
* Functions enable lazy evaluation for expensive log message generation.
|
|
260
|
+
*/
|
|
261
|
+
declare type LogMessage = string | (() => string);
|
|
262
|
+
|
|
263
|
+
export declare class PerformanceLogger extends BrowserLogger {
|
|
264
|
+
mark(name: string): void;
|
|
265
|
+
measure(name: string, startMark?: string, endMark?: string): void;
|
|
266
|
+
clearMarks(name?: string): void;
|
|
267
|
+
clearMeasures(name?: string): void;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Capabilities that a runtime may or may not support.
|
|
272
|
+
*/
|
|
273
|
+
declare interface RuntimeCapabilities {
|
|
274
|
+
/** Whether the runtime supports file system operations */
|
|
275
|
+
fileSystem: boolean;
|
|
276
|
+
/** Whether the runtime supports colored console output */
|
|
277
|
+
colorSupport: boolean;
|
|
278
|
+
/** Whether the runtime provides process information */
|
|
279
|
+
processInfo: boolean;
|
|
280
|
+
/** Whether the runtime supports streams */
|
|
281
|
+
streams: boolean;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Information about the detected JavaScript runtime environment.
|
|
286
|
+
*/
|
|
287
|
+
declare interface RuntimeInfo {
|
|
288
|
+
/** The name of the runtime */
|
|
289
|
+
name: RuntimeName;
|
|
290
|
+
/** Version string of the runtime (if available) */
|
|
291
|
+
version?: string;
|
|
292
|
+
/** Capabilities supported by this runtime */
|
|
293
|
+
capabilities: RuntimeCapabilities;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Supported JavaScript runtime environments.
|
|
298
|
+
*/
|
|
299
|
+
declare type RuntimeName = 'node' | 'deno' | 'bun' | 'browser' | 'webworker' | 'unknown';
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Safely stringify an object to JSON, handling circular references,
|
|
303
|
+
* Error objects, functions, and other non-serializable values.
|
|
304
|
+
* @param obj - The object to stringify
|
|
305
|
+
* @param space - Number of spaces for pretty-printing (optional)
|
|
306
|
+
* @returns JSON string representation
|
|
307
|
+
*/
|
|
308
|
+
export declare function safeStringify(obj: any, space?: number): string;
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Serialize Error objects to plain objects for logging.
|
|
312
|
+
* @param error - The error to serialize
|
|
313
|
+
* @returns Serialized error object or original value if not an Error
|
|
314
|
+
* @example
|
|
315
|
+
* ```typescript
|
|
316
|
+
* const error = new Error('Something went wrong');
|
|
317
|
+
* const serialized = serializeError(error);
|
|
318
|
+
* // Result: { name: 'Error', message: 'Something went wrong', stack: '...' }
|
|
319
|
+
* ```
|
|
320
|
+
*/
|
|
321
|
+
export declare function serializeError(error: any): any;
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Configuration for a specific log transport (output destination).
|
|
325
|
+
*/
|
|
326
|
+
declare interface TransportConfig {
|
|
327
|
+
/** Type of transport */
|
|
328
|
+
type: 'console' | 'file' | 'http' | 'custom';
|
|
329
|
+
/** Minimum log level for this transport */
|
|
330
|
+
level?: LogLevel;
|
|
331
|
+
/** Transport-specific options */
|
|
332
|
+
options: Record<string, any>;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
export { }
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { B as o, C as a, P as s, a as t, c as i, e as g, p as n, f, h as m, g as L, i as c, o as l, q as p } from "./node-BqvVrzA_.mjs";
|
|
2
|
+
import { formatLevel as u, formatLogEntry as v } from "./deno.esm.js";
|
|
3
|
+
export {
|
|
4
|
+
o as BrowserLogger,
|
|
5
|
+
a as ConsoleGroupLogger,
|
|
6
|
+
s as PerformanceLogger,
|
|
7
|
+
t as createLogger,
|
|
8
|
+
i as createLoggerForEnvironment,
|
|
9
|
+
g as detectRuntime,
|
|
10
|
+
n as filterSensitiveData,
|
|
11
|
+
u as formatLevel,
|
|
12
|
+
v as formatLogEntry,
|
|
13
|
+
f as isBrowser,
|
|
14
|
+
m as isBun,
|
|
15
|
+
L as isDeno,
|
|
16
|
+
c as isNode,
|
|
17
|
+
l as safeStringify,
|
|
18
|
+
p as serializeError
|
|
19
|
+
};
|
package/dist/browser.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./node-BKsollr4.js"),r=require("./deno.js");exports.BrowserLogger=e.BrowserLogger;exports.ConsoleGroupLogger=e.ConsoleGroupLogger;exports.PerformanceLogger=e.PerformanceLogger;exports.createLogger=e.createLogger;exports.createLoggerForEnvironment=e.createLoggerForEnvironment;exports.detectRuntime=e.detectRuntime;exports.filterSensitiveData=e.filterSensitiveData;exports.isBrowser=e.isBrowser;exports.isBun=e.isBun;exports.isDeno=e.isDeno;exports.isNode=e.isNode;exports.safeStringify=e.safeStringify;exports.serializeError=e.serializeError;exports.formatLevel=r.formatLevel;exports.formatLogEntry=r.formatLogEntry;
|