Skip to content

enableLog flag not working #66

Open
@balman

Description

@balman

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions