@types/logrotate-stream
TypeScript icon, indicating that this package has built-in type declarations

0.2.34 • Public • Published

Installation

npm install --save @types/logrotate-stream

Summary

This package contains type definitions for logrotate-stream (https://github.com/dstokes/logrotate-stream).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/logrotate-stream.

index.d.ts

/// <reference types="node" />

import stream = require("stream");

// wrapper to be able to use "export =" while also exporting the Options interface
declare namespace logrotateStream {
    /**
     * Options object for the exported function.
     */
    export interface Options {
        /**
         * The file log file to write data to.
         */
        file: string;
        /**
         * The max file size of a log before rotation occurs. Supports 1024, 1k, 1m, 1g
         */
        size: string | number;
        /**
         * The number of rotated log files to keep (including the primary log file). Additional logs are deleted no rotation.
         */
        keep: number;
        /**
         * Optionally compress rotated files with gzip.
         */
        compress?: boolean | undefined;
    }
}

/**
 * Create a rotating log stream.
 * @returns a writable stream to a rotating log file
 */
declare function logrotateStream(opts: logrotateStream.Options): stream.Writable;

export = logrotateStream;

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:38 GMT
  • Dependencies: @types/node

Credits

These definitions were written by Rogier Schouten.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/logrotate-stream

Weekly Downloads

291

Version

0.2.34

License

MIT

Unpacked Size

4.75 kB

Total Files

5

Last publish

Collaborators

  • types