Skip to content
This repository was archived by the owner on Jan 25, 2020. It is now read-only.
This repository was archived by the owner on Jan 25, 2020. It is now read-only.

Multiple file transports? #6

@johnkchiu

Description

@johnkchiu

I don't think it's possible to create multiple file transport via configuration...

    return pine(name, {
        transports: {
            file: {
                level: 'debug',
                filename: 'server.log'
            },
            // Error file logging
            file: {
                level: 'error',
                filename: 'error.log'
            }
        }
    });

I also registering winston-file as a module but it doesn't work either:

    return pine(name, {
        transports: {
            file: {
                name: 'file.debug',
                level: 'debug',
                filename: 'server.log'
            },
            // Error file logging
            fileError: {
                name: 'file.error',
                level: 'error',
                filename: 'error.log'
            }
        },
        modules: {
            fileError: {
                name: 'winston/lib/winston/transports',
                property: 'File'
            }
        }

But this doesn't work either, because you're using definition.property as the new transport name.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions