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

feat(compiler-cli): ngcc - make logging more configurable #29591

Closed
wants to merge 1 commit into from

Conversation

petebacondarwin
Copy link
Member

This allows CLI usage and integrations like webpack plugins
to filter excessive log messages.

// FW-1198

@petebacondarwin petebacondarwin added action: merge The PR is ready for merge by the caretaker effort1: hours freq2: medium area: core Issues related to the framework runtime target: major This PR is targeted for the next major release comp: ivy risk: low labels Mar 29, 2019
@petebacondarwin petebacondarwin requested a review from a team as a code owner March 29, 2019 16:58
@ngbot ngbot bot added this to the needsTriage milestone Mar 29, 2019
@ngbot
Copy link

ngbot bot commented Mar 29, 2019

I see that you just added the PR action: merge label, but the following checks are still failing:
    failure conflicts with base branch "master"
    pending missing required labels: cla: yes
    pending missing required status "ci/circleci: build"
    pending missing required status "ci/circleci: lint"
    pending missing required status "ci/circleci: publish_snapshot"
    pending missing required status "ci/angular: size"
    pending missing required status "cla/google"
    pending missing required status "google3"

If you want your PR to be merged, it has to pass all the CI checks.

If you can't get the PR to a green state due to flakes or broken master, please try rebasing to master and/or restarting the CI job. If that fails and you believe that the issue is not due to your change, please contact the caretaker and ask for help.

@petebacondarwin
Copy link
Member Author

I'm going to open up the API a bit more...

@petebacondarwin petebacondarwin added state: WIP and removed action: merge The PR is ready for merge by the caretaker labels Mar 29, 2019
This allows CLI usage to filter excessive log messages
and integrations like webpack plugins to provide their own logger.

// FW-1198
Copy link
Contributor

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@gkalpak gkalpak added action: merge The PR is ready for merge by the caretaker and removed state: WIP labels Mar 30, 2019
export const WARN = `${YELLOW}Warning:${RESET}`;
export const ERROR = `${RED}Error:${RESET}`;

export enum LogLevel {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need a log LogLevel?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know. We don't currently appear to :-) We can always add it later.

* The function will recurse into directories that start with `@...`, e.g. `@angular/...`.
* @param sourceDirectory An absolute path to the root directory where searching begins.
*/
private walkDirectoryForEntryPoints(sourceDirectory: AbsoluteFsPath): EntryPoint[] {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see these functions using the logger at all - is the fact that they're now private class methods instead of top-level functions related to the logging change?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes the getEntryPointsForPackage() method calls getEntryPointInfo(), which needs a logger.

I was really unhappy with having to pass the Logger down to that free standing function but as much as a played around I could not get a better architecture, without a significant refactoring of this whole bit of the codebase.

@jasonaden jasonaden closed this in 8d3d75e Apr 1, 2019
@petebacondarwin petebacondarwin deleted the FW-1198 branch April 1, 2019 19:02
wKoza pushed a commit to wKoza/angular that referenced this pull request Apr 17, 2019
)

This allows CLI usage to filter excessive log messages
and integrations like webpack plugins to provide their own logger.

// FW-1198

PR Close angular#29591
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime cla: yes effort1: hours freq2: medium risk: low target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants