@feizk/logger 2.0.1 → 2.0.2

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/dist/index.d.mts CHANGED
@@ -208,32 +208,4 @@ declare const LOG_LEVEL_PRIORITIES: Record<LogLevel, number>;
208
208
  */
209
209
  declare const LEVEL_LABELS: Record<LogLevel, string>;
210
210
 
211
- /**
212
- * Get the colored label for a log level.
213
- * Results are cached for performance.
214
- * @param level - The log level
215
- * @param enableColors - Whether to apply colors
216
- * @returns The label string (colored if enabled)
217
- */
218
- declare function getColoredLabel(level: LogLevel, enableColors: boolean): string;
219
- /**
220
- * Format a timestamp based on the provided option.
221
- * @param option - Preset string or custom formatter
222
- * @param date - Date to format (default: current date)
223
- * @returns Formatted timestamp string
224
- */
225
- declare function formatTimestamp(option: TimestampOption, date?: Date): string;
226
- /**
227
- * Format a log entry as JSON for structured logging.
228
- * @param entry - The log entry to format
229
- * @returns JSON string representation
230
- */
231
- declare function formatJson(entry: LogEntry): string;
232
- /**
233
- * Build the message string from log arguments.
234
- * @param args - The log arguments
235
- * @returns Formatted message string
236
- */
237
- declare function buildMessage(args: unknown[]): string;
238
-
239
- export { type ChildLoggerOptions, type Formatter, LEVEL_LABELS, LOG_LEVEL_PRIORITIES, type LogEntry, type LogLevel, Logger, type LoggerOptions, type TimestampOption, type Transport, buildMessage, formatJson, formatTimestamp, getColoredLabel };
211
+ export { type ChildLoggerOptions, type Formatter, LEVEL_LABELS, LOG_LEVEL_PRIORITIES, type LogEntry, type LogLevel, Logger, type LoggerOptions, type TimestampOption, type Transport };
package/dist/index.d.ts CHANGED
@@ -208,32 +208,4 @@ declare const LOG_LEVEL_PRIORITIES: Record<LogLevel, number>;
208
208
  */
209
209
  declare const LEVEL_LABELS: Record<LogLevel, string>;
210
210
 
211
- /**
212
- * Get the colored label for a log level.
213
- * Results are cached for performance.
214
- * @param level - The log level
215
- * @param enableColors - Whether to apply colors
216
- * @returns The label string (colored if enabled)
217
- */
218
- declare function getColoredLabel(level: LogLevel, enableColors: boolean): string;
219
- /**
220
- * Format a timestamp based on the provided option.
221
- * @param option - Preset string or custom formatter
222
- * @param date - Date to format (default: current date)
223
- * @returns Formatted timestamp string
224
- */
225
- declare function formatTimestamp(option: TimestampOption, date?: Date): string;
226
- /**
227
- * Format a log entry as JSON for structured logging.
228
- * @param entry - The log entry to format
229
- * @returns JSON string representation
230
- */
231
- declare function formatJson(entry: LogEntry): string;
232
- /**
233
- * Build the message string from log arguments.
234
- * @param args - The log arguments
235
- * @returns Formatted message string
236
- */
237
- declare function buildMessage(args: unknown[]): string;
238
-
239
- export { type ChildLoggerOptions, type Formatter, LEVEL_LABELS, LOG_LEVEL_PRIORITIES, type LogEntry, type LogLevel, Logger, type LoggerOptions, type TimestampOption, type Transport, buildMessage, formatJson, formatTimestamp, getColoredLabel };
211
+ export { type ChildLoggerOptions, type Formatter, LEVEL_LABELS, LOG_LEVEL_PRIORITIES, type LogEntry, type LogLevel, Logger, type LoggerOptions, type TimestampOption, type Transport };
package/dist/index.js CHANGED
@@ -22,11 +22,7 @@ var index_exports = {};
22
22
  __export(index_exports, {
23
23
  LEVEL_LABELS: () => LEVEL_LABELS,
24
24
  LOG_LEVEL_PRIORITIES: () => LOG_LEVEL_PRIORITIES,
25
- Logger: () => Logger,
26
- buildMessage: () => buildMessage,
27
- formatJson: () => formatJson,
28
- formatTimestamp: () => formatTimestamp,
29
- getColoredLabel: () => getColoredLabel
25
+ Logger: () => Logger
30
26
  });
31
27
  module.exports = __toCommonJS(index_exports);
32
28
 
@@ -363,9 +359,5 @@ var Logger = class _Logger {
363
359
  0 && (module.exports = {
364
360
  LEVEL_LABELS,
365
361
  LOG_LEVEL_PRIORITIES,
366
- Logger,
367
- buildMessage,
368
- formatJson,
369
- formatTimestamp,
370
- getColoredLabel
362
+ Logger
371
363
  });
package/dist/index.mjs CHANGED
@@ -330,9 +330,5 @@ var Logger = class _Logger {
330
330
  export {
331
331
  LEVEL_LABELS,
332
332
  LOG_LEVEL_PRIORITIES,
333
- Logger,
334
- buildMessage,
335
- formatJson,
336
- formatTimestamp,
337
- getColoredLabel
333
+ Logger
338
334
  };
package/package.json CHANGED
@@ -1,9 +1,8 @@
1
1
  {
2
2
  "name": "@feizk/logger",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "A lightweight, pluggable logger with colored outputs, structured logging, and transport support",
5
- "main": "dist/index.cjs",
6
- "module": "dist/index.js",
5
+ "main": "dist/index.js",
7
6
  "types": "dist/index.d.ts",
8
7
  "publishConfig": {
9
8
  "access": "public"
@@ -11,7 +10,7 @@
11
10
  "exports": {
12
11
  "types": "./dist/index.d.ts",
13
12
  "import": "./dist/index.js",
14
- "require": "./dist/index.cjs"
13
+ "require": "./dist/index.js"
15
14
  },
16
15
  "engines": {
17
16
  "node": ">=18"