The PhotoEditor SDK for iOS features a logger to provide important information to you and your users. Learn how to display or hide information.
With version 7 we introduced a new way of dealing with errors, warnings and such.
We created the
MasterLogger class, which will take care of managing child loggers and dispatch events.
The PhotoEditor SDK will use the logger to provide important information. It is up to you whether this information will be shown
to the user or handled by your code.
There are four types of log-events that are, ordered from high to low priority:
MasterLogger has a property called
logLevel, that will determine the lowest level of log-event that should be dispatched.
The default log-level is
warn, meaning that only warnings and errors will be logged. To disable logging, set the log level to
Each logger must implement the
that contains a method for each of these types. We provide a default logger, that will simply log to the debug console.
In case you want to add a custom logger, create a new class, implement the
LoggerProtocol and call the
add method of the
For more details, take a look at the
Here is an example for a simple log with warning as log-level.
MasterLogger.warn("This is my important warning!")