rotating-file-stream

  • Version 2.1.6
  • Published
  • 60.8 kB
  • No dependencies
  • MIT license

Install

npm i rotating-file-stream
yarn add rotating-file-stream
pnpm add rotating-file-stream

Overview

Opens a stream.Writable to a file rotated by interval and/or size. A logrotate alternative.

Index

Functions

function createStream

createStream: (
filename: string | Generator,
options?: Options
) => RotatingFileStream;

    Classes

    class RotatingFileStream

    class RotatingFileStream extends Writable {}

      constructor

      constructor(generator: Generator, options: Opts);

        Interfaces

        interface Options

        interface Options {}

          property compress

          compress?: boolean | string | Compressor;

            property encoding

            encoding?: BufferEncoding;

              property history

              history?: string;

                property immutable

                immutable?: boolean;

                  property initialRotation

                  initialRotation?: boolean;

                    property interval

                    interval?: string;

                      property intervalBoundary

                      intervalBoundary?: boolean;

                        property maxFiles

                        maxFiles?: number;

                          property maxSize

                          maxSize?: string;

                            property mode

                            mode?: number;

                              property path

                              path?: string;

                                property rotate

                                rotate?: number;

                                  property size

                                  size?: string;

                                    property teeToStdout

                                    teeToStdout?: boolean;

                                      Type Aliases

                                      type Compressor

                                      type Compressor = (source: string, dest: string) => string;

                                        type Generator

                                        type Generator = (time: number | Date, index?: number) => string;

                                          Package Files (1)

                                          Dependencies (0)

                                          No dependencies.

                                          Dev Dependencies (10)

                                          Peer Dependencies (0)

                                          No peer dependencies.

                                          Badge

                                          To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                          You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/rotating-file-stream.

                                          • Markdown
                                            [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/rotating-file-stream)
                                          • HTML
                                            <a href="https://www.jsdocs.io/package/rotating-file-stream"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>