rotating-file-stream
- Version 3.2.7
- Published
- 75.3 kB
- No dependencies
- MIT license
Install
npm i rotating-file-streamyarn add rotating-file-streampnpm add rotating-file-streamOverview
Opens a stream.Writable to a file rotated by interval and/or size. A logrotate alternative.
Index
Functions
Classes
Interfaces
Type Aliases
Functions
function createStream
createStream: ( filename: string | Generator, options?: Options) => RotatingFileStream;Classes
class RotatingFileStream
class RotatingFileStream extends Writable {}constructor
constructor(generator: Generator, options: Opts);class RotatingFileStreamError
class RotatingFileStreamError extends Error {}constructor
constructor();property code
code: string;Interfaces
interface Options
interface Options {}property compress
compress?: boolean | 'gzip' | Compressor;property encoding
encoding?: BufferEncoding;property history
history?: string;property immutable
immutable?: boolean;property initialRotation
initialRotation?: boolean;property interval
interval?: Interval;property intervalBoundary
intervalBoundary?: boolean;property intervalUTC
intervalUTC?: boolean;property maxFiles
maxFiles?: number;property maxSize
maxSize?: FileSize;property mode
mode?: number;property omitExtension
omitExtension?: boolean;property path
path?: string;property rotate
rotate?: number;property size
size?: FileSize;property teeToStdout
teeToStdout?: boolean;interface RotatingFileStream
interface RotatingFileStream extends Writable {}method addListener
addListener: <Event extends keyof RotatingFileStreamEvents>( event: Event, listener: RotatingFileStreamEvents[Event]) => this;method emit
emit: <Event extends keyof RotatingFileStreamEvents>( event: Event, ...args: Parameters<RotatingFileStreamEvents[Event]>) => boolean;method on
on: <Event extends keyof RotatingFileStreamEvents>( event: Event, listener: RotatingFileStreamEvents[Event]) => this;method once
once: <Event extends keyof RotatingFileStreamEvents>( event: Event, listener: RotatingFileStreamEvents[Event]) => this;method prependListener
prependListener: <Event extends keyof RotatingFileStreamEvents>( event: Event, listener: RotatingFileStreamEvents[Event]) => this;method prependOnceListener
prependOnceListener: <Event extends keyof RotatingFileStreamEvents>( event: Event, listener: RotatingFileStreamEvents[Event]) => this;method removeListener
removeListener: <Event extends keyof RotatingFileStreamEvents>( event: Event, listener: RotatingFileStreamEvents[Event]) => this;Type Aliases
type Compressor
type Compressor = (source: string, dest: string) => string;type FileSize
type FileSize = `${number}${FileSizeUnit}`;type FileSizeUnit
type FileSizeUnit = 'B' | 'K' | 'M' | 'G';type Generator
type Generator = (time: number | Date, index?: number) => string;type Interval
type Interval = `${number}${IntervalUnit}`;type IntervalUnit
type IntervalUnit = 'M' | 'd' | 'h' | 'm' | 's';Package Files (1)
Dependencies (0)
No dependencies.
Dev Dependencies (12)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto 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[](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>
- Updated .
Package analyzed in 2007 ms. - Missing or incorrect documentation? Open an issue for this package.
