npm.io
0.2.34 • Published 2 years ago

@types/logrotate-stream

Licence
MIT
Version
0.2.34
Deps
1
Size
5 kB
Vulns
0
Weekly
0
Stars
51.4K

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 0938 GMT
  • Dependencies: @types/node

Credits

These definitions were written by Rogier Schouten.