When a complete log message is available (from server output data) that
message is parsed for its slf4j context (logger name, logger level etc.)
and the specified
BiConsumer is invoked with the log message and
slf4j context.
Use this method only if you want a behavior that differentiates from the
default behavior as enabled by method
#enableDefaultSlf4jLoggingOfOutputData().
NOTE: You might want to call method
#clearOutPutStreams() before
calling this method.
implementation detail:
- if log message begins with
[debug] then log level is set to
DEBUG, otherwise log level is
INFO.
- the appium sub module name is parsed from the log message and used as
logger name (prefixed with "appium.service.", all lower case, spaces
removed). If no appium sub module is detected then "appium.service" is
used as logger name.
Example log-message: "[ADB] Cannot read version codes of " is logged by
appium.service.adb at level
INFO
Example log-message: "[debug] [XCUITest] Xcode version set to 'x.y.z' "
is logged by
appium.service.xcuitest at level
DEBUG