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

CLI does not output log messages from schematics #9976

Closed
sebawita opened this issue Mar 15, 2018 · 1 comment
Closed

CLI does not output log messages from schematics #9976

sebawita opened this issue Mar 15, 2018 · 1 comment

Comments

@sebawita
Copy link

Versions

Angular CLI: 1.6.6
Node: 6.9.1
OS: darwin x64

Repro steps

Run the following schematic Rule, using AngularCLI:

export function params(options: any): Rule {
  return chain([
    // Step 1 - get appRoot => open .angular-cli.json -> get apps.root
    (tree: Tree, context: SchematicContext) => {
      context.logger.info('message'); // <--- this
      return tree;
    },
  ])
}

Observed behavior

Angular runs the schematic, but the message doesn't get logged.

Desired behavior

Message should be logged in the terminal.

Mention any other details that might be useful (optional)

I am not sure if this is relevant, but I am overriding the defaults->schematics->collection in my .angular-cli.json.
So that I could run it by calling ng g myrule

@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 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants