Skip to content

Dedupe initLogging and initSilentLogging - #1153

Open
magic-peach wants to merge 1 commit into
k0sproject:mainfrom
magic-peach:chore/dedupe-init-logging
Open

Dedupe initLogging and initSilentLogging#1153
magic-peach wants to merge 1 commit into
k0sproject:mainfrom
magic-peach:chore/dedupe-init-logging

Conversation

@magic-peach

Copy link
Copy Markdown

These two were near-identical (an existing TODO comment flagged it). Extracted the shared body into initLoggingWithDefaultLevel(ctx, defaultLevel); both are now thin wrappers passing their respective default level. No behavior change.

Both functions set up the logger identically apart from the default
screen log level, per the TODO left on initSilentLogging. Extract the
shared body into initLoggingWithDefaultLevel and have both call it
with their respective default level; behavior for each caller is
unchanged.

Signed-off-by: Akanksha Trehun <akankshatrehun@gmail.com>
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.

1 participant