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

Deprecate logging methods on Moduleinstances #908

Open
eritbh opened this issue Mar 19, 2024 · 0 comments
Open

Deprecate logging methods on Moduleinstances #908

eritbh opened this issue Mar 19, 2024 · 0 comments

Comments

@eritbh
Copy link
Member

eritbh commented Mar 19, 2024

Module-related code that needs to use logging facilities is increasingly located in free functions which don't have the Module instance in scope, and manually saving the instance as a self variable just to use logging functionality feels weird and self-referential. Instead let's just have module files create their own TBLog instances and call log functions on those.

Once this is done we can remove the cheeky Object.assign() bits of logging-related code which set the logging methods on modules, and also the bit that causes the exported TBLog function to also work as a "default logger" with no caller (since everyone creating their own logger instances will always specify a caller).

Related to 9519582

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

1 participant