Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No way to control output verbosity #1500

Closed
elektronik2k5 opened this issue Oct 27, 2016 · 7 comments
Closed

No way to control output verbosity #1500

elektronik2k5 opened this issue Oct 27, 2016 · 7 comments

Comments

@elektronik2k5
Copy link

Do you want to request a feature or report a bug?
feature

What is the current behavior?
No way to increase/change cli output verbosity. No way to trace yarn's low level operations for troubleshooting purposes.

If the current behavior is a bug, please provide the steps to reproduce.

What is the expected behavior?
yarn should have a flag/configuration to control verbosity level. Something like npm's --loglevel <level> and --verbose.
As an example, try running npm i yarn --dry-run --verbose

Please mention your node.js, yarn and operating system version.
node v6.9.1
yarn v0.16.1
Fedora 24

@sebmck
Copy link
Contributor

sebmck commented Oct 27, 2016

We don't log any of Yarn's low level operations. I'm curious what type of information you think would be useful?

@elektronik2k5
Copy link
Author

elektronik2k5 commented Oct 27, 2016

Basically it is very useful for troubleshooting, tracing and debugging. Have a look at npm's output for npm i yarn --dry-run --verbose:

npm info it worked if it ends with ok
npm verb cli [ '/home/elektronik/.nodenv/versions/6.9.1/bin/node',
npm verb cli   '/home/elektronik/.nodenv/versions/6.9.1/bin/npm',
npm verb cli   'i',
npm verb cli   'yarn',
npm verb cli   '--dry-run',
npm verb cli   '--verbose' ]
npm info using [email protected]
npm info using [email protected]
npm verb request uri https://registry.npmjs.org/yarn
npm verb request no auth needed
npm info attempt registry request try #1 at 9:56:52 PM
npm verb request id 3a8196a920aec54b
...
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS:   linux
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
npm WARN [email protected] requires a peer of mocha@^2.0.1 but none was installed.
npm verb 
npm verb If you need help, you may report this error at:
npm verb     <https://github.com/npm/npm/issues>
npm verb exit [ 0, true ]
npm info ok 

I can see the invoked commands, arguments, current environment, http requests and headers, authentication details, cache hits, semver resolution, target files on the filesystem.

Ruby Bundler and Rust Cargo both have a --verbose flag as well.

@adamdicarlo
Copy link

I'd like to have --verbose at least to be able to see the actual error message without having to do grep -A-1 Trace yarn-error.log.

@agnoster
Copy link

agnoster commented Nov 1, 2016

Basically helpful for any error where it's not immediately obvious why you encountered that error. Just as one example: when I get a message saying that git clone failed, but it's for a URI that I don't see in package.json, nor in any of the other package.jsons in my repo, it'd be nice to know why yarn was trying to install that particular URI. Which package was it trying to install/resolve? What's the path here?

I was kinda surprised there wasn't any kind of verbose/logging/debugging mode. Feels like a real bootstrapping problem for new software. How do we even know what's going wrong without the ability to see why it's doing what it's doing?

@maybeec
Copy link

maybeec commented Nov 2, 2016

duplicate to #763

@maybeec
Copy link

maybeec commented Nov 2, 2016

Due to no verbose logging support, can someone say how I may takle issues like this:

events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: Command `yarn publish ./.build/` exited with code 1
    at ChildProcess.handleSubShellExit (D:\PNR\workspaces\Basis\ng-isy-style\node_modules\gulp-run\command.js:166:13)
    at ChildProcess.g (events.js:260:16)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)

Basically, nothing I can work with. 👎

@Daniel15
Copy link
Member

This is essentially the same as #763, so I'm going to close this task in favour of that one. Thanks for trying Yarn! 😄

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

No branches or pull requests

6 participants