Optional
contextOptional default context applied to all logs. Can include environment metadata, user data, etc. Individual log calls may override this.
Optional
fallbackFallback to synchronous logging when async buffers are full. Only applies when mode is 'async' or 'balanced'.
Optional
fileFile path for log output (SyncLogger only). When provided, logs will be written to this file synchronously.
Optional
forceForce flush to disk after each write (SyncLogger only). Uses fsync to ensure data is written to disk.
Optional
idUnique identifier for the logger instance. Used for filtering logs across services or systems.
Optional
idCustom ID generator function for log entries.
Optional
levelMinimum log level to output. Messages below this level will be filtered out.
Optional
logDirectory to store log files in (Node only).
Optional
logNumber of days to retain log files before pruning (Node only).
Optional
maxMaximum number of log entries to keep in browser storage. Has no effect in Node.js environments.
Optional
modeLogger performance mode configuration.
Optional
performancePerformance target hint for auto mode detection.
Optional
performanceEnable performance mode to disable styling for maximum throughput. When enabled, all styling is bypassed for 3x+ performance improvement.
Optional
prettyPretty-printing mode for non-string variadic args. 'inspect' uses util.inspect in Node (with colors when enabled); 'json' uses JSON.stringify; default is 'inspect'.
Optional
printWhen true, and verbose mode is enabled, append a compact [meta] summary of selected keys after the printed message. Meta remains structured for transports. Default: false
Optional
queueQueue management configuration for handling backpressure. Can be a QueueManager instance or options to create one.
Optional
rateRate limiting configuration for log throttling. Can be a RateLimiter instance or options to create one.
Optional
redactorPII and sensitive data redaction configuration. Can be a Redactor instance or options to create one.
Optional
restoreOptional
samplerStatistical sampling configuration for volume control. Can be a Sampler instance or options to create one.
Optional
storageName to use for browser storage (localStorage key or IndexedDB name). Has no effect in Node.js environments.
Optional
storeWhether to store logs in browser storage when in browser environment. Has no effect in Node.js environments.
Optional
strictEnforces strict log level behavior.
If true, unknown levels passed to .log()
will throw.
If false, unknown levels are treated as custom and passed to .custom()
.
Optional
tagsOptional static tags applied to all logs from this logger. Helps group or filter logs by functional or organizational tag.
Optional
themeTheme used to style logger output. Can be a string (theme name from ThemeManager) or a full object.
Optional
themeOptional mapping of tags to theme names. When provided, if a logger has any tag present in this map and no explicit theme is set, the mapped theme will be auto-applied. This enables brand/company-specific themes via tags.
Optional
transportsArray of transports to use for logging.
Optional
useEnables or disables terminal or console color output.
Optional
useWhether to use console transport by default. Set to false to disable automatic console output.
Optional
useWhether to automatically create default transports.
Optional
useWhether to use localStorage (true) or IndexedDB (false) for browser storage. Has no effect in Node.js environments.
Optional
verboseIf enabled, debug-level logs will be shown.
Optional
writeWrites logs to disk in timestamped .log
files (Node only).
Ignored in browsers.
Options for enhancing the console