A Node.js file-based logger that automatically creates log directories and rotates files by date. Version 2.2.10 supports custom formatters, configurable directory and filename patterns, and extends multiple logger types. It provides synchronous and asynchronous file writing with queued directory creation. Different from Winston or Pino due to minimal dependencies (only Node.js fs module) and a simpler API focused on file logging. Release cadence is low; last release was in 2021. Ships TypeScript type definitions.
npm install filestream-loggerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates creating a logger with custom formatter, logging messages, and waiting for file writes.
new FilestreamLogger('valid-type', options)Use external synchronization (e.g., setTimeout) or listen for uncatchable events.
Wrap in promise if needed: new Promise(resolve => logger.log('test', resolve))Always call callback in formatter, even on error.
Ensure formatter signature is (data, callback) and that data is an array; default formatter is (data, callback) => callback(data.join(' '))new FilestreamLogger('app')Ensure directory path is writable and accessible; use absolute paths if needed.
No dependency data recorded yet.