CyberSource / CyberSource/cybersource-rest-client-node
enableLog flag not working
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 49
- Forks
- 50
- Avg merge
- 18m
- Merged PRs (30d)
- 2
Description
Summary
The enableLog configuration option is disregarded and log files are generated even when the value is false.
Expected Behavior
Specifying enableLog: false when creating a new API client should suppress log files from being written to. An example would be as follows:
const cybersourceRestApi = require('cybersource-rest-client')
const merchantConfig = {
authenticationType: 'http_signature',
runEnvironment: 'cybersource.environment.SANDBOX',
merchantID: 'XXXXXXX',
merchantKeyId: 'XXXXXXXXX',
merchantsecretKey: 'XXXXXXXXXXXXXX',
enableLog: false // this should result in logs from the CyberSource REST client being suppressed
}
const paymentsApi = new cybersourceRestApi.PaymentsApi(merchantConfig)
Actual Behavior
When enableLog: false is specified, the CyberSource REST client still writes logs to the filesystem.
Other Comments
It looks like there was a switch to using the winston-daily-rotate-file package recently, and the enableLog option from the CyberSource client is being passed to this transport as part of a silent option. However, it looks like there is no reference to a silent option in the documentation for this package and so it may not be a valid option for this transport.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how enableLog is passed from the new API client configuration into the winston-daily-rotate-file transport, focusing on the transport's silent option. Confirm whether that option suppresses filesystem logging, then verify that enableLog: false prevents log files while the default or enabled setting still writes them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- observability-sre
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100