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

🐛 Provided target modules for Logger #802

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

hey-ewan
Copy link

fixes #698

@hhalex
Copy link
Contributor

hhalex commented Feb 20, 2025

Hello,

I just tested, and it does not seem to fix the issue
2025-02-20T09:27:31.489740Z ERROR hyle::utils::logger: Loading and decoding data_node/consensus_single_node.bin: Unexpected length of input error=Loading and decoding data_node/consensus_single_node.bin

I think using module_path! here in this file won't help, if put in the logger.rs file. Macros are expanded before methods are called.

What I think that would work (probably not the best option):

  • Create a macro that generates a LogMe trait extension
  • Call the macro in each file (yeah...) that needs the extensions .log_error ...
    This way macros will expand correctly, and the module will be the right one.

Copy link
Member

@wraitii wraitii left a comment

Choose a reason for hiding this comment

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

This doesn't seem to work so requesting changes for now

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.

Logger overrides module name
3 participants