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

Improve logger types #1208

Merged
merged 1 commit into from
May 10, 2023
Merged

Conversation

shawnmcknight
Copy link
Member

📝 Description

The current types for the LoggerFactory and Base Logger are incorrect in some cases or not specific enough in others. Multiple methods are accepting GenericObject instead of the more accurate LoggerBindings type and have been updated accordingly. Additionally, rather than allowing string as a type for the log levels return value, the more specific LogLevels type was used. Finally, the return types for getLogHandler was updated to reflect the correct return type of the function.

💎 Type of change

  • Bug fix (non-breaking change which fixes an issue)

🚦 How Has This Been Tested?

I've patched my local moleculer installation with these changes and implemented a custom logger using those fixed types.

🏁 Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have commented my code, particularly in hard-to-understand areas

shawnmcknight added a commit that referenced this pull request May 9, 2023
Copy link
Member

@icebob icebob left a comment

Choose a reason for hiding this comment

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

Cool, thanks!

@icebob icebob merged commit 3aee227 into moleculerjs:master May 10, 2023
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