Skip to content

Commit

Permalink
Unset the default logLevel in the integration (#529)
Browse files Browse the repository at this point in the history
If the logLevel was set by default by the Node.js integration it would
always use that level, even if `debug` was set. This option is
deprecated, but if set, and `logLevel` is not configured by the app, we
should listen to these options.

I've removed the default `logLevel` from the integration, but it will be
set by the extension and agent's log_level behavior. Since there's no
centralized logger in the Node.js integration yet, we do not need
to update any configuration for the integration's logger.
  • Loading branch information
tombruijn authored Dec 9, 2021
1 parent 2944082 commit d175bc1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
bump: "patch"
type: "fix"
---

Fix debug and transaction_debug_mode log options. If set, previously the log_level would remain "info", since version 2.2.6.
3 changes: 1 addition & 2 deletions packages/nodejs/src/__tests__/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ describe("Configuration", () => {
ignoreErrors: [],
ignoreNamespaces: [],
log: "file",
logLevel: "info",
requestHeaders: [
"accept",
"accept-charset",
Expand Down Expand Up @@ -266,7 +265,7 @@ describe("Configuration", () => {
expect(env("_APPSIGNAL_IGNORE_ERRORS")).toBeUndefined()
expect(env("_APPSIGNAL_IGNORE_NAMESPACES")).toBeUndefined()
expect(env("_APPSIGNAL_LOG")).toEqual("file")
expect(env("_APPSIGNAL_LOG_LEVEL")).toEqual("info")
expect(env("_APPSIGNAL_LOG_LEVEL")).toBeUndefined()
expect(env("_APPSIGNAL_LOG_FILE_PATH")).toEqual("/tmp/appsignal.log")
expect(env("_APPSIGNAL_PUSH_API_ENDPOINT")).toEqual(
"https://push.appsignal.com"
Expand Down
1 change: 0 additions & 1 deletion packages/nodejs/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ export class Configuration {
ignoreErrors: [],
ignoreNamespaces: [],
log: "file",
logLevel: "info",
requestHeaders: [
"accept",
"accept-charset",
Expand Down
2 changes: 1 addition & 1 deletion test/integration/diagnose

0 comments on commit d175bc1

Please sign in to comment.