Skip to content

Add log logger to ergot crate#119

Merged
jamesmunns merged 2 commits intojamesmunns:mainfrom
tommasoclini:main
Sep 1, 2025
Merged

Add log logger to ergot crate#119
jamesmunns merged 2 commits intojamesmunns:mainfrom
tommasoclini:main

Conversation

@tommasoclini
Copy link
Copy Markdown
Collaborator

@tommasoclini tommasoclini commented Sep 1, 2025

This allows treating ergot's logs differently to log normal logs through ergot

@jamesmunns
Copy link
Copy Markdown
Owner

@tommasoclini could you take a look at #120 as an alternative impl? I think this could be done without adding any additional unsafe as this PR does.

@tommasoclini
Copy link
Copy Markdown
Collaborator Author

@tommasoclini could you take a look at #120 as an alternative impl? I think this could be done without adding any additional unsafe as this PR does.

Doesn't that use the global logger? What happens if an interface has a worker task and it logs stuff after sending data?

@jamesmunns
Copy link
Copy Markdown
Owner

Yes, it does act as the global logger, as of now, we do need to somehow (?) make sure that we don't enable the level below the level that the system otherwise logs, e.g. using debug or trace level.

I'm not sure if I understand how this PR would avoid that, though!

@jamesmunns
Copy link
Copy Markdown
Owner

I spoke with @tommasoclini in chat, and I have a much better idea of what he had in mind now! I have some free time, so I'm going to merge this now and iterate on it in a follow up PR.

Thank you Tommaso for taking to he time to help me understand!

@jamesmunns jamesmunns merged commit 107e0dd into jamesmunns:main Sep 1, 2025
6 of 7 checks passed
@jamesmunns jamesmunns mentioned this pull request Sep 1, 2025
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