CyberSource / cybersource-rest-client-dotnet

.NET client library for the CyberSource REST API
Other
19 stars 44 forks source link

Logging not working #42

Open xantari opened 5 years ago

xantari commented 5 years ago

According to this you should be able to log all the traffic to the API by setting "enableLog", and "logDirectory", "LogFileName". However it doesn't work: https://github.com/CyberSource/cybersource-rest-samples-csharp/blob/master/src/Configuration.cs

Additionally, how do you override the logging infrastructure to log to my own logging framework?

xantari commented 5 years ago

I think I see the confusion.

See here: https://github.com/CyberSource/cybersource-rest-samples-csharp/blob/master/src/Configuration.cs. In that file are parameters to enable logging such as "enableLog", "logDirectory", "logFileName". However it seems those parameters are NOT used.

Instead it appears to get logging working you have to setup NLog as shown in your REST samples App.config shown here: https://github.com/CyberSource/cybersource-rest-samples-csharp/blob/master/src/App.config.

So the issue is that you have dead code in your API that should be removed and you should instruct people to use NLog to control logging.