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

fix: Remove erroneous prefixes when using loggerInjectable and prefixLoggerInjectable #7745

Merged
merged 1 commit into from May 19, 2023

Conversation

Nokel81
Copy link
Collaborator

@Nokel81 Nokel81 commented May 19, 2023

closes #7744

…LoggerInjectable

Signed-off-by: Sebastian Malton <sebastian@malton.name>
@Nokel81 Nokel81 added the bug Something isn't working label May 19, 2023
@Nokel81 Nokel81 added this to the 6.5.0 milestone May 19, 2023
@Nokel81 Nokel81 requested a review from a team as a code owner May 19, 2023 14:15
@Nokel81 Nokel81 requested review from jansav and jim-docker and removed request for a team May 19, 2023 14:15
(di: DiContainerForInjection): LogFunction => {
const getLogFunctionFor = (scenario: keyof Logger, namespace: string | undefined) => {
const prefix = namespace
? `[${screamingKebabCase(namespace.replace(/-feature$/, ""))}]: `
Copy link
Contributor

Choose a reason for hiding this comment

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

we assume the id or namespace is lowercase?

Copy link
Contributor

Choose a reason for hiding this comment

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

If somebody called their feature "my-feature"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah I did assume that given that all of them are. I can make a follow-up PR to fix this

@Nokel81 Nokel81 merged commit 00f0b9f into master May 19, 2023
16 checks passed
@Nokel81 Nokel81 deleted the remove-silly-logger-feature-prefix branch May 19, 2023 18:19
This was referenced May 23, 2023
@Nokel81 Nokel81 mentioned this pull request May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Most log lines have been prefixed with [LOGGER-FEATURE]:
2 participants