How can I enable in-depth logging in the mPOS SDK?

iOS
We use
CocoaLumberjack
for this and give you flexible options to control the formatting and levels.
To enable it, first add references to CocoaLumberjack:
#import "DDLog.h" #import "DDTTYLogger.h"
Then register a new logger with the system:
[DDLog addLogger:[DDTTYLogger sharedInstance]];
And finally enable logging in the SDK by increasing the log level. The maximum level we support is
LOG_LEVEL_DEBUG
[MPMpos setLogLevel:LOG_LEVEL_DEBUG];
We also provide a custom LogFormatter, that displays additional meta-data and uses a custom formatting. Give it a try by simply registering the formatter with your logger:
[[DDTTYLogger sharedInstance] setLogFormatter:[[MPLogFormatter alloc] init]];
When using the
DDTTYLogger
, the log statements will show up in the XCode console (Shift + Command + C) and can be extracted from there. Also, providing a log to our support team when you encounter problems will help us to identify the problem more quickly.
Android
The maximum level we support is
Log.DEBUG
MposExtended.setLogLevel(Log.DEBUG)