Logging mechanism is improved from 5.5.3 GA onwards by providing below log levels and hierarchy follows as TRACE(6) > DEBUG(5) > INFO(4) > WARN(3) > ERROR(2) > FATAL(1) > NONE(0).
You can use the following API to set the log level:
sync.log.setLogLevel(level, logSuccessCallback, logFailureCallback)
where level can be one of the following:
sync.log.setLogLevel(kony.sync.log.ERROR, logSuccessCallback, logFailureCallback)
You can use the following APIs to check the current log level:
sync.log.isDebugEnabled()
sync.log.isTraceEnabled()
sync.log.isInfoEnabled()
sync.log.isWarnEnabled()
sync.log.isFatalEnabled()
sync.log.isNoneEnabled()
These return a Boolean value, true for Enabled and false for Disabled.
For example, if the level is set to DEBUG, sync.log.isTraceEnabled() returns false and the rest of the hierarchy functions return true.
Note:
If log is set at TRACE level, then all the lower levels like DEBUG, INFO are also logged.
Copyright © 2013 Kony, Inc. All rights reserved. |