Uh oh!
There was an error while loading. Please reload this page.
module: remove unnecessary JSON.stringify - #3578
Conversation
MylesBorins
commented
Oct 29, 2015
could template strings have a similar result? |
cjihrig
commented
Oct 29, 2015
LGTM. It's simpler to read too. I think template strings would suffer the same problem as the original code (stringification even when not debugging). |
zertosh
commented
Oct 29, 2015
For the |
There was a problem hiding this comment.
Style nit: this should align with the previous line's parameter
`debuglog` uses `%j` as a placeholder for replacement with `JSON.stringify`. So that `JSON.stringify` is only called when the appropriate debug flag is on. The other `%s` changes are for style consistency.
thefourtheye
commented
Oct 29, 2015
LGTM with a style nit |
evanlucas
commented
Oct 29, 2015
LGTM |
jasnell
commented
Oct 29, 2015
LGTM but since this touches module we may want more @nodejs/ctc review. |
trevnorris
commented
Oct 29, 2015
I generally hate how we handle |
zertosh
commented
Oct 31, 2015
Seems like everyone is Ok on this. Merge? |
evanlucas
commented
Nov 5, 2015
@jasnell am I good to land this or do we want to get CTC review? |
cjihrig
commented
Nov 5, 2015
I think 3 CTC LGTMs and 2 more from collaborators should be sufficient. |
cjihrig
commented
Nov 5, 2015
Although, has CI been run? |
evanlucas
commented
Nov 5, 2015
Good catch. CI: https://ci.nodejs.org/job/node-test-pull-request/674/ |
jasnell
commented
Nov 5, 2015
+1 :)
|
`debuglog` uses `%j` as a placeholder for replacement with `JSON.stringify`. So that `JSON.stringify` is only called when the appropriate debug flag is on. The other `%s` changes are for style consistency. PR-URL: #3578 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
jasnell
commented
Nov 5, 2015
CI was green. Landed in faa3bb8 |
`debuglog` uses `%j` as a placeholder for replacement with `JSON.stringify`. So that `JSON.stringify` is only called when the appropriate debug flag is on. The other `%s` changes are for style consistency. PR-URL: #3578 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
`debuglog` uses `%j` as a placeholder for replacement with `JSON.stringify`. So that `JSON.stringify` is only called when the appropriate debug flag is on. The other `%s` changes are for style consistency. PR-URL: #3578 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins
commented
Nov 16, 2015
landed in lts-v4.x-staging as 948af71 |
`debuglog` uses `%j` as a placeholder for replacement with `JSON.stringify`. So that `JSON.stringify` is only called when the appropriate debug flag is on. The other `%s` changes are for style consistency. PR-URL: #3578 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
`debuglog` uses `%j` as a placeholder for replacement with `JSON.stringify`. So that `JSON.stringify` is only called when the appropriate debug flag is on. The other `%s` changes are for style consistency. PR-URL: #3578 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
`debuglog` uses `%j` as a placeholder for replacement with `JSON.stringify`. So that `JSON.stringify` is only called when the appropriate debug flag is on. The other `%s` changes are for style consistency. PR-URL: #3578 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Use
debulog's placeholder replacement%jfor stringification. So calls toJSON.stringifyare only made bydebuglogwhen you're actually debugging. Also, made the remaining calls todebuglogconsistent with this style.