Skip to content

disable progress-estimator logging (for lerna run --stream build or CI) #689

@langpavel

Description

@langpavel

In CI environment or with lerna run --stream build it is desired to not clean line. This is caused by fancy logger (from progress-estimator)

Current Behavior

Fancy progress estimator appear in console on tsdx build.
This is not as cool as it should be in some cases,
it may overwrites output of different process run in parallel i.e. with lerna --stream

Desired Behavior

Possibility to turn on no line-destructive logger

Suggested Solution

Replace fancy progress-estimator with primitive console.log if:

  • CI environment is detected process.env.CI
  • new flag --no-estimate is set
  • (non std-out output detected)

Who does this impact? Who is this for?

  • CI environments (possibly automatically on)
  • People using lerna --stream

Activity

changed the title [-]fix `lerna --stream` build output[/-] [+]fix `lerna run --stream build` output[/+] on Apr 19, 2020
changed the title [-]fix `lerna run --stream build` output[/-] [+]disable progress-estimator logging (for `lerna run --stream build` or CI)[/+] on Apr 20, 2020
agilgur5

agilgur5 commented on Apr 21, 2020

@agilgur5
Collaborator

This sounds like a reasonable feature to have. Alternatively, would a --silent config option work for you? All of TSDX's tests run in parallel as well and it makes for quite messy output, so I've been thinking of adding a silencing option for that alone.

--silent might be preferred for CI too (if you like clean logs). But yea we could check for non-TTY env (process.stdout.isTTY) or for CI env(process.env.CI) to auto-set this or a console.log option.

I'm not sure what a console.log alternative would be called; should be more generic than --no-estimate but I can't think of it off the top of my head (I feel like there's a term for this).

langpavel

langpavel commented on Apr 24, 2020

@langpavel
Author

@agilgur5
--silent is not what I'm looking for. Build and test output is quite useful. (You may send everything to /dev/null and result will be the same :-) )

I'm not using tsdx test runner in monorepo, only in one package if needed (for monorepo I have global jest config)
Sad is all the fancy logging output without respect to stupid terminals and text logs.

I can possibly prepare PR with --no-estimate

added
scope: integrationRelated to an integration, not necessarily to core (but could influence core)
on Apr 26, 2020
helt

helt commented on Jul 3, 2020

@helt

lerna uses a global --no-progress flag, hence i suppose to stick with their naming convention.

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

    kind: featureNew feature or requestscope: integrationRelated to an integration, not necessarily to core (but could influence core)topic: monorepoRelated to Lerna monorepos

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @langpavel@helt@agilgur5

      Issue actions

        disable progress-estimator logging (for `lerna run --stream build` or CI) · Issue #689 · jaredpalmer/tsdx