Skip to content

Writes a log message to stderr even when everything is OK #249

Closed

Description

@SteveSandersonMS

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?

Activity

  1. jbrantly commented on Jul 18, 2016

    @jbrantly
    Member

    See #95 for a discussion on this.

  2. johnnyreilly commented on Oct 12, 2016

    @johnnyreilly
    Member

    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)

  3. SteveSandersonMS commented on Oct 17, 2016

    @SteveSandersonMS
    Author

    Is this still a problem for you?

    Thanks for getting back to me. No, it's not still a problem: we set silent to true by default in the project templates, and nobody has complained :)

  4. johnnyreilly commented on Oct 17, 2016

    @johnnyreilly
    Member

    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!

  5. added a commit that references this issue on Oct 17, 2016
  6. johnnyreilly commented on Oct 17, 2016

    @johnnyreilly
    Member

    Released with 0.9.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions