Nuvei SDK .NET Logging

Smart2pay’s SDK provide support for logging using LoggerProvider which enables you to use the logging framework of your choice as a provider.

You need to implement ILogger interface and supply a Logging factory. A Logging factory is just a Func which should return the same Logger for a given stringKey.

See the below example of how to register the Logger Factory:

LoggingDefault.Provider.RegisterLoggerFactory(key => {/* please add your custom logger factory code here */ })

Please register the factory only once in the start method of your application!