Skip to content
This repository has been archived by the owner on Sep 7, 2018. It is now read-only.

util.print deprecation warnings appearing in reporter output. Replace with console.log. #452

Closed
GCheung55 opened this issue May 12, 2015 · 9 comments

Comments

@GCheung55
Copy link
Contributor

node@0.12 is deprecating util.print: https://nodejs.org/api/util.html#util_util_print

Thoughts on replacing util.print with console.log?

@dominykas
Copy link
Member

Seeing plenty of these myself... I'm not sure console.log is the way to go - my guess is that util.print was used, because console is hijacked during test runs to intercept the messages? So, probably a correct alternative might be to hook into process.stdout.

@GCheung55
Copy link
Contributor Author

I can swap with process.stdout. Do you think a fallback to console.log would be necessary in case process is undefined?

On May 12, 2015, at 1:33 PM, Dominykas Blyžė notifications@github.com wrote:

Seeing plenty of these myself... I'm not sure console.log is the way to go - my guess is that util.print was used, because console is hijacked during test runs to intercept the messages? So, probably a correct alternative might be to hook into process.stdout.


Reply to this email directly or view it on GitHub.

@dominykas
Copy link
Member

Can the process even be undefined? If there's util.print, I assume it's node code, therefore process should be also there. Either way, when I last looked at this, there was some other issue, but I can't recall... maybe sync/async problems... maybe something else. This needs a little bit of doc reading/research to list out what are the differences between the three things (util, console and stdout).

@GCheung55
Copy link
Contributor Author

Perhaps we can use util.log instead?

On May 13, 2015, at 2:16 AM, Dominykas Blyžė notifications@github.com wrote:

Can the process even be undefined? If there's util.print, I assume it's node code, therefore process should be also there. Either way, when I last looked at this, there was some other issue, but I can't recall... maybe sync/async problems... maybe something else. This needs a little bit of doc reading/research to list out what are the differences between the three things (util, console and stdout).


Reply to this email directly or view it on GitHub.

@dominykas
Copy link
Member

Docs say util.log will have a timestamp prepended... I'd say stdout approach is better, as you mentioned on IRC. I just really don't remember what was the problem with it :)

GCheung55 pushed a commit to GCheung55/buster-test that referenced this issue May 15, 2015
@GCheung55
Copy link
Contributor Author

I've switched to using process.stdout.

On May 14, 2015, at 12:44 AM, Dominykas Blyžė notifications@github.com wrote:

Docs say util.log will have a timestamp prepended... I'd say stdout approach is better, as you mentioned on IRC. I just really don't remember what was the problem with it :)


Reply to this email directly or view it on GitHub.

@GCheung55
Copy link
Contributor Author

@augustl, @dwittner, @cjohansen: Thoughts on the change?

@dominykas
Copy link
Member

I'm all for it - no commit rights, though :)

@dwittner
Copy link
Member

@GCheung55 , version 0.7.13 of buster-test is released. Please check it.

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

No branches or pull requests

3 participants