Skip to content

Updated logs #230

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

Merged
merged 4 commits into from
Mar 25, 2019
Merged

Updated logs #230

merged 4 commits into from
Mar 25, 2019

Conversation

grouma
Copy link
Member

@grouma grouma commented Mar 22, 2019

  • No longer plumb the logHandler throughout DevWorkflow simply make it globally available.
  • Override the logHandler in the Daemon command.
    • This fixes an issue where some logs were not captured from the DevHandler.
  • Actually enable verbose logs in webdev serve
  • Add additional progress logs for the daemon command

Closes #219
Closes #220

@grouma grouma requested a review from jakemac53 March 22, 2019 00:08
stdout.writeln('');
}
}

void Function(Level level, String message) logHandler = colorLog;
Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't very discoverable - especially buried at the end of the serve/utils file :D.

If we are going with a global like this I would move it to a lib/src/logging.dart file so that its a bit easier to find, and document it clearly.

I would also consider a Zone variable, which at least removes some of the limitations of general global variables.

Copy link
Member Author

Choose a reason for hiding this comment

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

Moved logging logic to logging.dart. Given that this logging logic is only used by the serve command I don't think we really need a zone. If it gets more complicated in the future, which I don't anticipate, we can revisit.

@grouma grouma merged commit b1305d2 into master Mar 25, 2019
@grouma grouma deleted the updated-logs branch March 25, 2019 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide daemon progress/log feedback for restarts webdev daemon should use app.progress instead of daemon.logMessage for build progress
2 participants