Skip to content
This repository was archived by the owner on Sep 5, 2019. It is now read-only.
This repository was archived by the owner on Sep 5, 2019. It is now read-only.

Write to STDERR, not STDOUT (for webpack --json > stats.json) #15

@ypresto

Description

@ypresto
  • Operating System: macOS 10.13.6
  • Node Version: v8.7.0
  • NPM Version: 5.4.2
  • webpack Version: 4.12.0
  • webpack-dev-server Version: N/A
  • This is a bug
  • This is a feature request
  • This is a modification request

Code

$ node -e '"log,debug,info,warn,error".split(",").forEach(level =>  require("webpack-log")({ name: "test" })[level](level))' > /dev/null
⚠ 「test」: warn
✖ 「test」: error

Expected Behavior

Always write to STDERR, or at least configurable from caller.

Actual Behavior

Only warn and error are written to STDERR, others are written to STDOUT.

For Features; What is the motivation and/or use-case for the feature?

webpack --json > stats.json will cause corrupted JSON if log written to STDOUT.
s-panferov/awesome-typescript-loader#461

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