Skip to content

[CDTOOL-1193] Support for Logging Endpoint Errors#1721

Open
rcaril wants to merge 3 commits intomainfrom
rcaril/CDTOOL-1193-support-for-logging-endpoint-errors
Open

[CDTOOL-1193] Support for Logging Endpoint Errors#1721
rcaril wants to merge 3 commits intomainfrom
rcaril/CDTOOL-1193-support-for-logging-endpoint-errors

Conversation

@rcaril
Copy link
Copy Markdown
Contributor

@rcaril rcaril commented Apr 9, 2026

Change summary

This PR adds support for the service logging debug commands, which streams logging endpoint errors.

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions:

  • Does your submission pass tests?
 make test TEST_ARGS="-run TestParseLoggingError  ./pkg/commands/service/logging/debug"
ok      github.com/fastly/cli/pkg/commands/service/logging/debug        1.017s

Changes to Core Features:

  • Have you written new tests for your core changes, as applicable?
  • Have you successfully run tests with your changes locally?

Example Output:

INFO: Streaming logging endpoint errors for service <SID>

14:55:10 | Broken Log | Get "https://my-broken.logging.org/.well-known/fastly/logging/challenge": lookup my-broken.logging.org. on 127.0.0.1:53: no such host
14:55:21 | Broken Log | Get "https://my-broken.logging.org/.well-known/fastly/logging/challenge": lookup my-broken.logging.org. on 127.0.0.1:53: no such host
14:55:24 | Broken Log | Get "https://my-broken.logging.org/.well-known/fastly/logging/challenge": lookup my-broken.logging.org. on 127.0.0.1:53: no such host

Note: Claude Code was leveraged to build this feature

@rcaril rcaril force-pushed the rcaril/CDTOOL-1193-support-for-logging-endpoint-errors branch from 298e131 to 020be64 Compare April 9, 2026 19:17
@rcaril rcaril marked this pull request as ready for review April 9, 2026 19:19
@rcaril rcaril requested a review from a team as a code owner April 9, 2026 19:19
Copy link
Copy Markdown
Contributor

@kpfleming kpfleming left a comment

Choose a reason for hiding this comment

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

This is fine as-is, but I've suggested some minor improvements.


// RootCommand is the parent command for all subcommands in this package.
// It should be installed under the primary root command.
type RootCommand struct {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is really minor, but since there aren't any subcommands all references to RootCommand should be DebugCommand.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Moved in 114dbcd.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It looks like the linter is throwing an error now due to the naming convention:

pkg/commands/service/logging/debug/root.go:28:6: exported: type name will be used as debug.DebugCommand by other packages, and that stutters; consider calling this Command (revive)
type DebugCommand struct {

Thoughts @kpfleming - should we revert it back or see if a override can be used?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added an override in f09a9c3 for the time being.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's actually fine to just call it Command too, since it is the only command in this package.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Maybe we'll ask @anthony-gomez-fastly to make the deciding call on this one :)

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.

2 participants