You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Writes a log message to stderr even when everything is OK #249
When ts-loader starts up, it logs messages like this to stderr:
ts-loader: Using typescript@1.8.10 and /some/path/tsconfig.json
This is because the log function calls console.log.apply(console, message), and the console variable is overridden as follows:
var console = new Console(process.stderr);
I know most of the log values outputted by ts-loader are errors, but the Using typescript@... message isn't an error. Logging it to stderr isn't great, because many apps are configured to treat stderr output as actual errors (and write it to a DB, email an administrator, etc.)
I am aware this can be suppressed by setting silent to true, but then this suppresses other potentially useful error information.
Would it be possible not to log the Using typescript@... to stderr, but still log other messages to stderror?
Awesome 😄 As it happens we're likely to merge this PR which should provide an option to control this. Not that you seem to need it but it should be there soon!
Activity
Set ts-loader to "silent" mode until there's a fix for TypeStrong/ts-…
jbrantly commentedon Jul 18, 2016
See #95 for a discussion on this.
johnnyreilly commentedon Oct 12, 2016
Hi @SteveSandersonMS,
Is this still a problem for you? If so I think we're open to PRs (the discussion in #95 may be useful)
SteveSandersonMS commentedon Oct 17, 2016
Thanks for getting back to me. No, it's not still a problem: we set
silentto true by default in the project templates, and nobody has complained :)johnnyreilly commentedon Oct 17, 2016
Awesome 😄 As it happens we're likely to merge this PR which should provide an option to control this. Not that you seem to need it but it should be there soon!
#249 Add explicit info logger to avoid writing info logs to stderr (#313
johnnyreilly commentedon Oct 17, 2016
Released with 0.9.4