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

Add Verbose Agent Logging Option #1532

Merged
merged 8 commits into from
Sep 19, 2019
Merged

Add Verbose Agent Logging Option #1532

merged 8 commits into from
Sep 19, 2019

Conversation

joshmeek
Copy link

@joshmeek joshmeek commented Sep 18, 2019

Thanks for contributing to Prefect!

Please describe your work and make sure your PR:

  • adds new tests (if appropriate)
  • updates CHANGELOG.md (if appropriate)
  • updates docstrings for any new functions or function arguments, including docs/outline.toml for API reference docs (if appropriate)

Note that your PR will not be reviewed unless all three boxes are checked.

What does this PR change?

Closes #1501
Adds new agent log level config option
prefect agent start --verbose/-v to enable or config.cloud.agent.level

Why is this PR important?

Allows for finer grained logging from the agent

@joshmeek joshmeek added enhancement An improvement of an existing feature agent labels Sep 18, 2019
@codecov
Copy link

codecov bot commented Sep 18, 2019

Codecov Report

Merging #1532 into master will increase coverage by <.01%.
The diff coverage is 91.3%.

Copy link
Member

@cicdw cicdw left a comment

Choose a reason for hiding this comment

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

Some requests for variations on a few logs - this is going to be great!

src/prefect/agent/agent.py Outdated Show resolved Hide resolved
src/prefect/agent/agent.py Show resolved Hide resolved
src/prefect/agent/agent.py Show resolved Hide resolved
src/prefect/agent/local/agent.py Outdated Show resolved Hide resolved
src/prefect/agent/local/agent.py Outdated Show resolved Hide resolved
Copy link
Member

@cicdw cicdw left a comment

Choose a reason for hiding this comment

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

🚀 excellent 🚀

@@ -45,9 +45,8 @@ def __init__(self) -> None:
self._verify_token(token)

logger = logging.getLogger("agent")
Copy link
Member

Choose a reason for hiding this comment

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

Not sure if it matters but this is not a Prefect logger

Copy link
Member

Choose a reason for hiding this comment

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

That's intentional - these logs are intended to be streamed to stdout in whatever platform the agent is running in. We should introduce the notion of "Agent logs" to store in Cloud, and find a way of exposing them in a way that is flow-independent but that's a future feature.

@joshmeek joshmeek merged commit 33e18c6 into master Sep 19, 2019
@joshmeek joshmeek deleted the verbose_lossing branch September 19, 2019 18:02
zanieb added a commit that referenced this pull request Apr 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An improvement of an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Agent debug/verbose logs
3 participants