Application Logs client-side (available soon)

CTLive logs are available opening browser console.

Logs are enabled by default but they can be enabled/disabled in the followings ways.

Webpage level

When loading ctlive sdk into the hosting web page, logs can be enabled or disabled for all users opening that specific webpage.

Parameter: log

Values: true/false

Default: true

<script type="text/javascript" async src="http://<host>/livechat/stresstest/lib/livechatsdk.js?log=false"></script>

Session level

Even at webpage logs are disabled, for a specific session, logs are enabled using an api via browser console, e.g. for development or troubleshooting purpose. The setting is persistent because it’s stored using browser localStorage related to the domain page.

Availables APIs are:

Api

Description

Values

Default

Api

Description

Values

Default

lichaUtil.debug()

Enable/Disable logs

true/false

true

lichaUtil.resetDebug()

Reset to the webPage level

none

N/A

lichaUtil.isDebug()

Return debug value

node

N/A

Usage

Open browser console (F12) and type lichaUtil.debug() to enable log

After having called API, reload the webpage to see the log level applied.

Setting is persistent at browser level, because it’s stored on webpage localStorage.

CAVEATS

  • A minimal log level is always present event when logs are disabled.

  • error logs are not disalable.