juttle / winston-logrotate

Log rotating transport for Winston
Apache License 2.0
10 stars 8 forks source link

fixed redirection to file transport instead of console #10

Closed jathanasiou closed 7 years ago

jathanasiou commented 7 years ago

The following lines regarding the stdout and stderror

        process.__defineGetter__('stdout', function () {
            return log_stream;
        });
        process.__defineGetter__('stderr', function () {
            return log_stream;
        });

were removed from the event

    log_stream.on('ready', function () {

And issue #4 appears to be fixed without any breaking changes. Was unable to verify with the automated tests however, unit testing looked good.

demmer commented 7 years ago

In a previous stint we relied on this to grab all output from the process, but I've personally moved on to other pastures so I see no problem with adding this change -- anyone who is actually relying on the previous behavior will need to pin to the earlier version.

jathanasiou commented 7 years ago

@demmer makes sense. After all, cases of logs being sent to wrong transport seem far more critical than backwards compatibility with an older version.