You can use
CocoaLumberjack to enable in-depth logging in the mPOS SDK, which includes flexible options for controlling the formatting and levels.
To enable in-depth logging, first add references to CocoaLumberjack:
#import "DDLog.h"
#import "DDTTYLogger.h"
Register a new logger with the system:
[DDLog addLogger:[DDTTYLogger sharedInstance]];
Enable logging in the SDK by increasing the log level. The maximum level supported is
LOG_LEVEL_DEBUG
:
[MPMpos setLogLevel:LOG_LEVEL_DEBUG];
A custom LogFormatter that displays additional meta data and uses a custom formatting is provided. To enable it, register the formatter with your logger:
[[DDTTYLogger sharedInstance] setLogFormatter:[[MPLogFormatter alloc] init]];
When using the
DDTTYLogger
, the log statements will appear in the XCode console (Shift + Command + C) and can be extracted from there. When requesting support, providing the log statements will help Customer Support identify issues more quickly.
The maximum level supported is
Log.DEBUG
:
MposExtended.setLogLevel(Log.DEBUG)