Logger API

CoreAPI.getLogger

Get the log instance object

let logger = CoreAPI.getLogger();

logger.info

Information

logger.info(remark, content, type = "LWA")
  • remark: remark;
  • content: content;
  • type: type, default is LWA if not passed.
Example:
logger.info('face-api', 'success')
  • Return result log file example:
{
  "dateTime": 1709891709950,
  "status": "The server is alive!"
}

logger.warning

Warning

logger.warning(remark, content, type = "LWA")
  • remark: remark;
  • content: content;
  • type: type, default is LWA if not passed.
Example:
logger.warning('face-api', 'warning-content')
  • Return result log file example:
{
  "type": "LWA",
  "level": "warning",
  "remark": "face-api",
  "content": "warning-content"
}

logger.error

Error

logger.error(remark, content, type = "LWA")
  • remark: remark;
  • content: content;
  • type: type, default is LWA if not passed.
Example:
logger.error('face-api', 'fatal-content')
  • Example of returned result log file:
AxiosError: Network Error

logger.debug

Debug

logger.debug(remark, content, type = "LWA")
  • remark: remark;
  • content: content;
  • type: type, default is LWA if not passed.
Example:
logger.debug('face-api', 'debug-content')
  • Example of returned result log file:
{
  "type": "LWA",
  "level": "debug",
  "remark": "face-api",
  "content": "debug-content"
}

results matching ""

    No results matching ""