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

Logger's been set twice #1027

Closed
akadori opened this issue Jul 31, 2021 · 2 comments · Fixed by #1076
Closed

Logger's been set twice #1027

akadori opened this issue Jul 31, 2021 · 2 comments · Fixed by #1076
Assignees
Labels
bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented good first issue Good for newcomers
Milestone

Comments

@akadori
Copy link

akadori commented Jul 31, 2021

When I looked at the code in the link, I noticed that the same process was written twice.
I wondered if this was intentional?

https://github.com/slackapi/bolt-js/blob/08b50ca75817e17849daeeafb9df519755ca49ef/src/receivers/ExpressReceiver.ts#L84:L97


    if (typeof logger !== 'undefined') {
      this.logger = logger;
    } else {
      this.logger = new ConsoleLogger();
      this.logger.setLevel(logLevel);
    }

    if (typeof logger !== 'undefined') {
      this.logger = logger;
    } else {
      this.logger = new ConsoleLogger();
      this.logger.setLevel(logLevel);
    }
@gitwave gitwave bot added the untriaged label Jul 31, 2021
@stevengill
Copy link
Member

This sure looks like a mistake. Maybe due to a bad merge?

@stevengill stevengill added bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented and removed untriaged labels Jul 31, 2021
@stevengill stevengill added this to the 3.6.0 milestone Jul 31, 2021
@filmaj
Copy link
Contributor

filmaj commented Jul 31, 2021

Indeed, looks like an error during merge: aa7626b#diff-683369dc41aa82b5b3c78fe442af93e64e5ca7a02d82daf4720ba68ea2d4e0dbR83-R89

Sometimes automatic git merge combines things in ways that would be unexpected and undesirable. This is why I prefer to git rebase over git merge - even though often that's more work 🤷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants