ICatchPancamLog class

  1. package com.icatchtek.pancam.customer;
  2. public final class ICatchPancamLog extends java.lang.Object {
  3. ...
  4. }

This class is used to set parameters of the logging mechanism.

  1. Open and close logs, includes write to standard output and write to file.
  2. Set the log file path.
  3. Set the output log type, filter level
  4. Turn the debug mode on or off(Turning on the debug mode ensures that the log is not lost, but will affect the system performance).

Public methods

getInstance

  1. public static ICatchPancamLog getInstance()

This is a static method used to create an instance of this class, which will be the starting point for App programming.
Returns:

  • ICatchPancamLog instance.

setSystemLogOutput

  1. public void setSystemLogOutput(boolean bOutput)

Set whether to output log to standard output, it is important to not that on Android, the log will info be written to DDMS.
Parameters:

  • bOutput - When true, turn on the output to the console

setFileLogPath

  1. public void setFileLogPath(java.lang.String path)

Set the path of the log file.
Parameters:

  • path - log file path.

setFileLogOutput

  1. public void setFileLogOutput(boolean bOutput)

Set whether to output to a log file.
Parameters:

  • bOutput - When true, turn on the output to file

setDebugMode

  1. public void setDebugMode(boolean debugMode)

Set whether to turn on debugging mode, in debug mode, the SDK will guarantee that no log information will be dropped, but such a setting will cause the SDK to run slower and should only open when some problem occur.
Parameters:

  • debugMode - When true, open the debug mode.

setLog

  1. public void setLog(int type,
  2. boolean enable)

Turn on or off specific type of log output.
Parameters:

  • type - The log type, definitions can be found in ICatchGLLogType
  • enable - When true, the SDK will output log information that matches this type.

setLogLevel

  1. public void setLogLevel(int type,
  2. int level)

Set the log level of specific type of log output, and log information below this level will not be logged.
Parameters:

  • type - The log type, definitions can be found in ICatchGLLogType
  • level - The log level, definitions can be found in ICatchGLLogLevel

logI

  1. public void logI(java.lang.String subTag,
  2. java.lang.String message)

This method used by App to write log information trough SDK’s log system. The log level is INFO
Parameters:

  • subTag - A shorter TAG for this log message
  • message - Specific log information

logW

  1. public void logW(java.lang.String subTag,
  2. java.lang.String message)

This method used by App to write log information trough SDK’s log system. The log level is WARN
Parameters:

  • subTag - A shorter TAG for this log message
  • message - Specific log information

logE

  1. public void logE(java.lang.String subTag,
  2. java.lang.String message)

This method used by App to write log information trough SDK’s log system. The log level is ERROR
Parameters:

  • subTag - A shorter TAG for this log message
  • message - Specific log information