rotating-file-stream
- Version 3.2.5
- Published
- 74.9 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
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 | 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 intervalUTC
intervalUTC?: boolean;
property maxFiles
maxFiles?: number;
property maxSize
maxSize?: string;
property mode
mode?: number;
property omitExtension
omitExtension?: boolean;
property path
path?: string;
property rotate
rotate?: number;
property size
size?: string;
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 Generator
type Generator = (time: number | Date, index?: number) => string;
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[![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>
- Updated .
Package analyzed in 1847 ms. - Missing or incorrect documentation? Open an issue for this package.