feat(logging): add detailed logging support to the CLI - #1745
Conversation
|
Harness reviewer is failing with This looks like a bug related to codebuild migration where python version is not available. I also see the same issue in: Unsure on what the codebuild job is doing here, I don't see any workflows with that name https://github.com/aws/agentcore-cli/tree/main/.github/workflows. @notgitika do you have an idea of where is this coming from? |
|
The .tsx file extension should only be used with files with JSX, in my experience it helps to know at a glance which files contain components and which are utils/logic. |
| const commandPath = ctx.require(PathKey); | ||
| const logger = config.logger.child({ commandPath }); | ||
| try { | ||
| logger.child({ flags, args }).debug("executing command"); |
There was a problem hiding this comment.
do we redact any sensitive values used in args? like in agentcore add credential
There was a problem hiding this comment.
we currently do not, but we'll definitely want to once we have sensitive data coming through here. I think this makes the most sense to address when we start introducing relevant functionality.
Let me add a comment here to help avoid missing this on future implementations.
I think this makes sense. I created a backlog issue to migrate this: #1755. |
Direct port of AlexanderRichey/agentcore-cli#3.
Problem
The CLI is currently doesn't log detailed information for debugging purposes.
Solution
pinoto wrap detailed logs to files in.agentcore/logs/.withLoggingmiddleware to inject this logger into each command handler with command path metadata.Note: these are structured JSON logs that accept arbitrary bindings.
Examples:
Testing
Notes