Skip to content

rust: Rename LogContext->Context, LogSink->Sink #279

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 6 commits into from
Mar 14, 2025

Conversation

gasmith
Copy link
Contributor

@gasmith gasmith commented Mar 11, 2025

Changelog

  • LogContext renamed to Context
  • LogContext::global renamed to Context::get_default.
  • Context no longer implements Default, to avoid confusion.
  • LogSink renamed to Sink

@gasmith gasmith self-assigned this Mar 11, 2025
Copy link

linear bot commented Mar 11, 2025

@gasmith gasmith requested review from eloff and bryfox March 11, 2025 23:50
@gasmith gasmith marked this pull request as ready for review March 11, 2025 23:50
Copy link
Contributor

@bryfox bryfox left a comment

Choose a reason for hiding this comment

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

Could you comment on the choice of Namespace? I saw an argument that context may be confused with go logging contexts, but I think "context" has a lot of precedent with different meanings, and "namespace" doesn't necessarily solve that problem. I think "context" conveys more to me here, but admittedly this is based on features I imagine us introducing in future versions.

@gasmith gasmith changed the title rust: Rename LogContext->Namespace, LogSink->Sink rust: Rename LogContext->Context, LogSink->Sink Mar 12, 2025
@gasmith
Copy link
Contributor Author

gasmith commented Mar 12, 2025

Could you comment on the choice of Namespace?

After discussion, we've settled on keeping Context (but dropping the Log prefix).

@gasmith gasmith merged commit f2b03b5 into main Mar 14, 2025
36 checks passed
@gasmith gasmith deleted the gasmith/fg-10741-naming branch March 14, 2025 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants