Skip to content

api!: make logging macros private #6918

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 1 commit into from
Jun 21, 2025
Merged

api!: make logging macros private #6918

merged 1 commit into from
Jun 21, 2025

Conversation

link2xt
Copy link
Collaborator

@link2xt link2xt commented Jun 16, 2025

This is a preparation for #6919. I want to add dependency on the tracing crate into logging macros, but then they cannot be used by crates that do not import tracing as well. Overall not exporting internal logging macros seems cleaner to me, it also discourages library users from logging their own logs into our event channel.

@link2xt link2xt force-pushed the link2xt/log-module-private branch 2 times, most recently from 6a2ed76 to 523d6d3 Compare June 16, 2025 03:32
@link2xt link2xt marked this pull request as draft June 16, 2025 03:35
@link2xt link2xt force-pushed the link2xt/log-module-private branch from 523d6d3 to d3c7b3a Compare June 16, 2025 03:58
@link2xt link2xt changed the base branch from main to link2xt/message-object-no-webxdc-info June 16, 2025 03:58
@link2xt link2xt force-pushed the link2xt/log-module-private branch 2 times, most recently from ba60e54 to 7b16ea9 Compare June 16, 2025 14:09
@link2xt link2xt changed the title api!: make log module private api!: make logging macros private Jun 16, 2025
@link2xt link2xt force-pushed the link2xt/log-module-private branch 4 times, most recently from 7b992d7 to 451029d Compare June 16, 2025 14:43
@link2xt link2xt changed the base branch from link2xt/message-object-no-webxdc-info to main June 16, 2025 14:43
@link2xt link2xt force-pushed the link2xt/log-module-private branch 2 times, most recently from 8224920 to f81fe2a Compare June 17, 2025 22:44
@link2xt link2xt changed the base branch from main to link2xt/nightly-clippy June 17, 2025 22:44
@link2xt link2xt force-pushed the link2xt/log-module-private branch from f81fe2a to c3468f0 Compare June 17, 2025 23:19
@link2xt link2xt marked this pull request as ready for review June 17, 2025 23:44
Base automatically changed from link2xt/nightly-clippy to main June 18, 2025 10:19
@link2xt link2xt force-pushed the link2xt/log-module-private branch from c3468f0 to c85e7b2 Compare June 18, 2025 11:47
@link2xt link2xt requested review from iequidoo and Hocuri June 18, 2025 20:57
@@ -120,7 +120,7 @@ async fn poke_spec(context: &Context, spec: Option<&str>) -> bool {
} else {
let rs = context.sql().get_raw_config("import_spec").await.unwrap();
if rs.is_none() {
error!(context, "Import: No file or folder given.");
eprintln!("Import: No file or folder given.");
Copy link
Collaborator

Choose a reason for hiding this comment

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

It's strange that in other places println! is used for logging, i.e. logs go to stdout. Should be fixed in a separate PR

src/smtp.rs Outdated
Comment on lines 16 to 17
use crate::log::warn;
use crate::log::{error, info};
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
use crate::log::warn;
use crate::log::{error, info};
use crate::log::{error, info, warn};

@link2xt link2xt force-pushed the link2xt/log-module-private branch from c85e7b2 to 68e412f Compare June 21, 2025 02:56
@link2xt link2xt merged commit 545007a into main Jun 21, 2025
29 checks passed
@link2xt link2xt deleted the link2xt/log-module-private branch June 21, 2025 11:01
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