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 given to WebClient is destructively modified #916

Closed
5 of 15 tasks
seratch opened this issue Nov 27, 2019 · 0 comments · Fixed by #917
Closed
5 of 15 tasks

Logger given to WebClient is destructively modified #916

seratch opened this issue Nov 27, 2019 · 0 comments · Fixed by #917
Assignees
Labels
pkg:web-api applies to `@slack/web-api`

Comments

@seratch
Copy link
Member

seratch commented Nov 27, 2019

Description

The Logger instance given to WebClient is destructively modified with a static name "WebClient" and also given logLevel.

This particularly affects Bolt apps. The name of all the logs generated by Bolt apps is forcibly set as WebClient:{instanceId}.

I'll come up with a pull request suggesting a possible solution to address this issue.

What type of issue is this? (place an x in one of the [ ])

  • bug
  • enhancement (feature request)
  • question
  • documentation related
  • testing related
  • discussion

Requirements (place an x in each of the [ ])

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.

Bug Report

Filling out the following details about bugs will help us solve your issue sooner.

Packages:

Select all that apply:

  • @slack/web-api
  • @slack/events-api
  • @slack/interactive-messages
  • @slack/rtm-api
  • @slack/webhooks
  • I don't know

Reproducible in:

package version: all
node version: any
OS version(s): any

Steps to reproduce:

A Bolt app as below reproduces the issue.

const { App } = require('@slack/bolt');
const { ConsoleLogger, LogLevel } = require('@slack/logger');
const logger = new ConsoleLogger();
const app = new App({
  logger: logger,
  token: process.env.SLACK_BOT_TOKEN,
  signingSecret: process.env.SLACK_SIGNING_SECRET
});

Expected result:

Already stated in the description.

Actual result:

Already stated in the description.

Attachments:

None.

@seratch seratch added the pkg:web-api applies to `@slack/web-api` label Nov 27, 2019
@seratch seratch self-assigned this Nov 27, 2019
seratch added a commit to seratch/node-slack-sdk that referenced this issue Nov 27, 2019
seratch added a commit that referenced this issue Nov 28, 2019
Fix #916 Logger given to WebClient is destructively modified
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg:web-api applies to `@slack/web-api`
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant