@uppy/companion options ignore disabled debug
See original GitHub issueCurrently, 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:
- Created 3 years ago
- Reactions:1
- Comments:9 (4 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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
Updating docs in https://github.com/transloadit/uppy/commit/24fb4fb6babe88cc8b3e6969c43da54dae2d736e 😃
thanks for bringing this up!