question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@uppy/companion options ignore disabled debug

See original GitHub issue

Currently, on my nodejs server, I am facing an issue related to the debug option where it doesn’t matter if I set it to false, it just ignores it and keeps logging into the console.

companion: 2020-11-03T02:13:00.109Z [info] companion.client.version uppy client version 1.0.0
companion: 2020-11-03T02:13:00.111Z [info] companion.client.version uppy client version 1.0.0
companion: 2020-11-03T02:13:00.114Z [info] companion.client.version uppy client version 1.0.0
companion: 2020-11-03T02:13:00.130Z [info] companion.client.version uppy client version 1.0.0

Reviewing the source this line https://github.com/transloadit/uppy/blob/e2f2f917fa5498b6862d45e116873a849e72ad96/packages/%40uppy/companion/src/companion.js#L40 I understand why always log the info and I think there is missing a validation here https://github.com/transloadit/uppy/blob/e2f2f917fa5498b6862d45e116873a849e72ad96/packages/%40uppy/companion/src/companion.js#L278 to have something like this:

if (options.debug) {
  logger.info(`uppy client version ${req.companion.clientVersion}`, 'companion.client.version');
}

Nodejs: v12.18.3 Package: “@uppy/companion”: “^2.1.0”

Thanks

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
parisholleycommented, Feb 23, 2021

there needs to be an option to disable, any application with high request volume is going to unnecessarily pay for logging it doesn’t need. why not just add a debug route that returns JSON of diagnostic info

1reaction
goto-bus-stopcommented, Mar 31, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

Companion - Uppy
To plug Companion into an existing server, call its .app() method, passing in an options object as a parameter. This returns an object...
Read more >
Migration guides - Uppy
Migration guides. These cover all the major Uppy versions and how to migrate to them. Migrate from Robodog to Uppy plugins. Uppy is...
Read more >
const - Uppy
With this option set to false , users can upload some files, and you can listen for the 'complete' event to continue to...
Read more >
Robodog: Form API - Uppy
As for the options that are unavailable: exclude is intended to exclude certain <input type="file"> inputs from Transloadit processing. It will likely not...
Read more >
Uppy 1.3: Accessibility and performance, new languages
debugLogger option is going to replace debug: true . ... Previously, our ID generation would ignore any non-alphanumeric characters in the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found