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

Refactor: use log macros without importing from slog #5944

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

kantai
Copy link
Contributor

@kantai kantai commented Mar 21, 2025

The logging macros previously required that users import both the macro and the corresponding slog macro, which is pretty annoying (and at least in my case, trips up my editor's auto import so that I could auto-import the logging macro, but needed to manually add the slog macro import).

@kantai kantai requested a review from a team as a code owner March 21, 2025 13:46
@kantai kantai force-pushed the chore/refactor-log-macros branch from 2f35403 to dec99dc Compare March 21, 2025 14:04
@aldur aldur added this to the 3.1.0.0.8 milestone Mar 21, 2025
@aldur aldur requested review from jferrant and fdefelici March 21, 2025 15:45
Copy link

@fdefelici fdefelici left a comment

Choose a reason for hiding this comment

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

Good move!

just added a small remark

@@ -22,7 +22,6 @@
#[macro_use]
extern crate stacks_common;

#[macro_use(slog_debug, slog_info, slog_warn)]
extern crate slog;

Choose a reason for hiding this comment

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

now that we've removed macro_use, could we also remove extern crate slog right? Or do we keep it for some other reason?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Status: In Review
Development

Successfully merging this pull request may close these issues.

4 participants