Skip to content

unable to reuse configuration object #10

Closed
@ferrao

Description

@ferrao

If i create a config object like this:

var config = {
    size: '10M',
    interval: '30s',
    rotate: 5
};

and reuse it on two calls to rotating-file-stream, the second call will fail with:

Error: Don't know how to handle 'options.size' type: number

The type number seems to come from expanding the original object from 10M to 10485760.

My workaround is to create a new object with exact same properties on each call to rotating-file-stream, but in my opinion, it should be up to the module to clone it and not impose this non documented restriction on the user.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions