Logging API

Table of Contents

Logging API

The Logging API is used to access the client console logger.

The following Logging APIs are available:



ice.log.debug(logger, message, exception)

Logs a DEBUG level message to the console or log window.

Usage:

ice.log.debug(ice.log, 'Debug message');

Parameters:

  • logger

    The logger.

  • message

    The message to be logged.


ice.log.info(logger, message, exception)

Logs a INFO level message to the console or log window.

Usage:

ice.log.info(ice.log, 'Info message');

Parameters:

  • logger

    The logger.

  • message

    The message to be logged.


ice.log.warn(logger, message, exception)

Logs a WARN level message to the console or log window.

Usage:

ice.log.warn(ice.log, 'Warning message');

Parameters:

  • logger

    The logger.

  • message

    The message to be logged.


ice.log.error(logger, message, exception)

Logs a ERROR level message to the console or log window.

Usage:

try {
  ...
} catch (e) {
  ice.log.error(ice.log, 'Error occurred', e);
}

Parameters:

  • logger

    The logger.

  • message

    The message to be logged.

  • responseDOM

    The captured exception. This is an optional parameter.


ice.log.childLogger(parentLogger, categoryName)

Creates an new child logger that logs its messages into the defined category.

Usage:

var a = ice.log.childLogger(ice.log, 'A');
ice.log.debug(a, 'message in category A');
//outputs -- [window.A] debug: message in category A

var aa = ice.log.childLogger(a, 'AA');
ice.log.warn(aa, 'message in category AA');

//outputs -- [window.A.AA] warning: message in category AA

Parameters:

  • logger

    The parent logger.

  • categoryName

    The name of the category.


Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

© Copyright 2018 ICEsoft Technologies Canada Corp.