How to use the streamroller.RollingFileStream function in streamroller

To help you get started, we’ve selected a few streamroller examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github log4js-node / log4js-node / lib / appenders / file.js View on Github external
function openTheStream(file, fileSize, numFiles, options) {
  const stream = new streams.RollingFileStream(
    file,
    fileSize,
    numFiles,
    options
  );
  stream.on('error', (err) => {
    console.error('log4js.fileAppender - Writing to file %s, error happened ', file, err); //eslint-disable-line
  });
  stream.on('drain', () => {
    process.emit("log4js:pause", false);
  });
  return stream;
}
github fossasia / susper.com / node_modules / log4js / lib / appenders / file.js View on Github external
function openTheStream(file, fileSize, numFiles, options) {
  const stream = new streams.RollingFileStream(
    file,
    fileSize,
    numFiles,
    options
  );
  stream.on('error', (err) => {
    console.error('log4js.fileAppender - Writing to file %s, error happened ', file, err); //eslint-disable-line
  });
  return stream;
}

streamroller

file streams that roll over when size limits, or dates are reached

MIT
Latest version published 1 month ago

Package Health Score

80 / 100
Full package analysis