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

[Feature Request] Option to silence output to stdout / logging #361

Closed
zarko-tg opened this issue Nov 11, 2021 · 2 comments · Fixed by #362
Closed

[Feature Request] Option to silence output to stdout / logging #361

zarko-tg opened this issue Nov 11, 2021 · 2 comments · Fixed by #362
Labels
enhancement New feature or request

Comments

@zarko-tg
Copy link

Is your feature request related to a problem? Please describe.

Yes, there's a problem if say you want to run some Dart CLI program, whose goal is to write something to the stdout, a result that might be used by something else later. The problem is that FVM is doing at least some logging and thus "polluting" the stdout in this scenario. This line for example:
FvmLogger.info('fvm: running Dart from Flutter "$version"\n');

Describe the solution you'd like

A way to silence any logging from FVM, an option such as -s / --silent or similar.

Describe alternatives you've considered

Calling dart directly, with downside being that one needs to hardcode the path and not use "fvm dart ...".

@zarko-tg zarko-tg added the enhancement New feature or request label Nov 11, 2021
@leoafarias
Copy link
Owner

@zarko-tg I believe I had done this already for the flutter command.

If you want you can do a PR using the logger.trace as it shown here and I can review.

https://github.com/leoafarias/fvm/blob/main/lib/src/commands/flutter_command.dart

If not I should be able to get to it over the weekend.

@zarko-tg
Copy link
Author

Now that went quickly, cheers!

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

Successfully merging a pull request may close this issue.

2 participants