Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change console transport to write directly to stdout & stderr #163

Closed
wants to merge 1 commit into from

Conversation

kuhnza
Copy link
Contributor

@kuhnza kuhnza commented Aug 7, 2012

Changed console transport to log directly to stdout & stderr. This allows for overriding console.log|error etc without causing an infinite recursive loop.

Fixes #162

…lows for overriding console.log|error etc without causing an infinite recursive loop
@jfhbrook
Copy link
Contributor

I approve. Will merge. 👍

@jfhbrook
Copy link
Contributor

merged. Thanks!

@jfhbrook jfhbrook closed this Oct 19, 2012
@kuhnza
Copy link
Contributor Author

kuhnza commented Oct 20, 2012

Cheers Josh

Dave

On Friday, October 19, 2012 at 2:31 PM, Joshua Holbrook wrote:

I approve. Will merge.


Reply to this email directly or view it on GitHub (#163 (comment)).

@TimBeyer
Copy link

I realize I'm a bit late to the party, but this was a very bad idea.
It is absolutely non-obvious that calling your logging level 'debug' suddenly writes your logs to stderr.
Debug messages are not objectively errors. In our case, debug messages are there to have verbose output about the internals of the application.

Having them go to stderr for hidden reasons caused a lot of headaches and a lot of wasted time.
It took quite a while to find the reason for it.

You should never make assumptions about where logging output goes unless it's explicitly logged as an error, and even then it should be asked for explicitly.

@Morriz
Copy link

Morriz commented Aug 19, 2013

Pleeeeeeaaase pull tooxie's request!

@tooxie
Copy link

tooxie commented Aug 20, 2013

@Morriz You can use my fork if you want, I applied this fix and it's currently up to date. I can't promise I will maintain it (i.e. fix bugs) but I could merge any good PR that is pending.

I wish I didn't have to fork it, but it was the only alternative for me. Just add "winston": "git+ssh://[email protected]:tooxie/winston.git" to your package.json file.

@Morriz
Copy link

Morriz commented Aug 20, 2013

Yeah, I might do that. Thing is that my current project's dev environment (byod) has the git port closed, so I can only install thru npm. Kind of a hassle and quite strange, but reality :|

On 20 aug. 2013, at 09:58, Alvaro Mouriño [email protected] wrote:

@Morriz You can use my fork if you want, I applied this fix and it's currently up to date. I can't promise I will maintain it (i.e. fix bugs) but I could merge any good PR that is pending.

I wish I didn't have to fork it, but it was the only alternative for me. Just add "winston": "git+ssh://[email protected]:tooxie/winston.git" to your package.json file.


Reply to this email directly or view it on GitHub.

@tooxie
Copy link

tooxie commented Aug 20, 2013

@Morriz Then rename it and upload it to the npm registry. Is really easy.

@Morriz
Copy link

Morriz commented Aug 20, 2013

Nah, I don't want to register a fork in npm for adding a config flag.

I'd rather keep the modified package in my own repo until the flag gets
added in the original, which I deem likely to happen.

By having the modified package temporarily sourced under
./node_modules/winston it stands out in our version control system, and
remains a suspect for future change, That might trigger developers after me
might to dive in and check if npm finally has a desired version.

But thanks for thinking along :)

On Tue, Aug 20, 2013 at 2:46 PM, Alvaro Mouriño [email protected]:

@Morriz https://github.com/Morriz Then rename it and upload it to the
npm registry. Is really easy.


Reply to this email directly or view it on GitHubhttps://github.com//pull/163#issuecomment-22942188
.

@tooxie
Copy link

tooxie commented Aug 22, 2013

@Morriz What about git over HTTPS?

@Morriz
Copy link

Morriz commented Aug 26, 2013

It's like I said, I think it's polluting github when everybody starts forking for a missing config flag...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Console transport should write directly to stdout & stderr
6 participants