Skip to content

Add logging support#35

Merged
posborne merged 3 commits into
mainfrom
posborne/logging-endpoints
Feb 18, 2026
Merged

Add logging support#35
posborne merged 3 commits into
mainfrom
posborne/logging-endpoints

Conversation

@posborne
Copy link
Copy Markdown
Member

This change introduces both low-level logging endpoint access and a higher-level interface to write logs using python's standard logging facade. Also included are test cases and example code to help facilitate that testing.

A callable mapper is provided in order to support users that may want to map logger's by name to more than a single fastly logging endpoint.


This will need to be tweaked once we have changes for generated exceptions but I expect that to be minimal.

@posborne posborne requested a review from erikrose January 29, 2026 19:37
@posborne posborne force-pushed the posborne/logging-endpoints branch from b2fe061 to 6d6c3e4 Compare January 29, 2026 19:43
Copy link
Copy Markdown
Member

@erikrose erikrose left a comment

Choose a reason for hiding this comment

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

Seems reasonable. Thank you!

Comment thread fastly_compute/log.py Outdated
Comment thread fastly_compute/log.py
Comment thread fastly_compute/log.py
Comment thread fastly_compute/log.py Outdated
Comment thread examples/logging/log_app.py
Comment thread examples/logging/logging.py Outdated
Comment thread fastly_compute/log.py Outdated
@erikrose
Copy link
Copy Markdown
Member

Here are the few logging tests I ported as part of developing #43:
test_logging.py

This change introduces both low-level logging endpoint access
and a higher-level interface to write logs using python's
standard logging facade.  Also included are test cases and
example code to help facilitate that testing.

A callable mapper is provided in order to support users that
may want to map logger's by name to more than a single fastly
logging endpoint.
Here, there was an assumption that examples/logging/logging.py
would exist.  It doesn't as this created a namespace conflict; just
remove the unecessary check.
@posborne posborne force-pushed the posborne/logging-endpoints branch from 6d6c3e4 to ce98741 Compare February 18, 2026 19:13
@posborne
Copy link
Copy Markdown
Member Author

@erikrose I rebased as there were conflicts against main but believe I have the key problems addressed now. I'm assuming we want to land this prior to #43 still since your changes there build on this?

@erikrose
Copy link
Copy Markdown
Member

Order of landing the two shouldn't matter.

Copy link
Copy Markdown
Member

@erikrose erikrose left a comment

Choose a reason for hiding this comment

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

Looks good!

@posborne posborne merged commit d936fcb into main Feb 18, 2026
4 checks passed
@posborne posborne deleted the posborne/logging-endpoints branch February 18, 2026 20:46
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