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

[Discussion] pass log level of command as 1build flag #145

Open
gopinath-langote opened this issue Sep 26, 2019 · 2 comments
Open

[Discussion] pass log level of command as 1build flag #145

gopinath-langote opened this issue Sep 26, 2019 · 2 comments
Labels
enhancement New feature or request hold Further information is requested Team Discussion Team Discussion (not ready for pickup yet)

Comments

@gopinath-langote
Copy link
Owner

gopinath-langote commented Sep 26, 2019

Description

  • With a framework like gradle, mvn, node - developer gets a choice to see only ERROR or WARN log as to avoid extra information printed on the console. It will be good if somehow we integrate such functionality in 1build.
  • example: 1build test --level error or 1build test --error-only

There are ways to do so –

  1. just analyze each line & see if it starts with ERROR , WARN etc (as most of the popular build tools print level in each line)
  2. Understand underline tool and integrate tools logging functionality with 1build - Which I am not a big fan of such tight coupling of tools.

Any other strategies are most welcome to discuss.

WDYT?
@landpro
@Ritabrata-TW
@themayurkumbhar
@RajatVaryani
@maniish-jaiin
@akhilbojedla

@gopinath-langote gopinath-langote added hold Further information is requested Team Discussion Team Discussion (not ready for pickup yet) enhancement New feature or request labels Sep 26, 2019
@gopinath-langote gopinath-langote added this to To do in Feature Ideas / Bug tracker via automation Sep 26, 2019
@gopinath-langote gopinath-langote changed the title [Beta - Discussion] pass log level of command as 1build flag [Discussion] pass log level of command as 1build flag Sep 26, 2019
@pradeepmurugesan
Copy link

@gopinath-langote I think 1build should handle this in a way npm does it. 1build doesn't know about the underlying test command. So its better if 1build gets the param from the user and supply the same to the underlying command. For ex:

1build test | --log-level = error

we pass any params after the | to the underlying script set by the user.
Downside: will defeat the purpose of 1build, meaning the user has to remember which project they are in to pass the right flag ( npm or gradle or mvn)

Approach 2:

1build can define a set of standard options for the users to use. Have a map for the commonly used tools and their option. For ex:

1build option tool option
test level npm --level=%s
test level gradle level %s

users can call 1build command with 1build test level=ERROR then 1build takes care of detecting the users build tool and map the level to corresponding options.

The above data structure can be optimised for sure.. Just some random thought on top of my mind.

@gopinath-langote
Copy link
Owner Author

Hello @pradeepmurugesan

The later approach LGTM. Let's get others openion on this and we can move further on this topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hold Further information is requested Team Discussion Team Discussion (not ready for pickup yet)
Projects
Development

No branches or pull requests

2 participants