The SampleGadget_Logging sample gadget is intended to serve as an example of initializing and using the
Finesse logger.
This sample illustrates how to initialize the logger and log a message to the console and the Finesse agent logs on the Finesse server.
1. initialize private var
clientLogs = finesse.cslogger.ClientLogger;
2. connect with hub
clientLogs.init(gadgets.Hub, "SampleGadget_Logging"); // SampleGadget_Logging = gadgetid, this gadget id will be logged as a part of the message
3. log stuff
clientLogs.log("**** in SampleGadget_Logging ****");
This is only a sample and is NOT intended to be a production quality
gadget and will not be supported as such. It is NOT guaranteed to
be bug free. It is merely provided as a guide for a programmer to see
how to initialize the logger and write to the Finesse log.
The sample contains the following files:
SampleGadget_Logging.xml
SampleGadget_Logging.js
SampleGadget.css
SampleGadget_Logging_readme.txt
SampleGadget_Logging.docx
This gadget sample is made available to Cisco partners and customers as
a convenience to help minimize the cost of Cisco Finesse customizations.
Please see the readme.txt in the finesse javascript libraries zip
for futher information about the Finesse libraries.
II. Requirements
-------------------------------------------------------------------------------
The following includes:
finesse.js (requires the Finesse javascript library for Finesse 9.0(1) or later)
jquery-1.5.min.js
III. Usage
-------------------------------------------------------------------------------
Place the gadget in the finesse layout. Turn on the debugger console in the browser.
Login an agent and change agent state. You should see a line:
LOG: 11:23:49: SampleGadget_Logging : **** in SampleGadget_Logging ****
in the console.
In order to get the log entry into the Finesse server, click Send Error Report on the Finesse desktop.
After that you can pull the Finesse desktop log for the agent and you will see the same
LOG: line in that log. For how to obtain logs see the Finesse Installation and Getting
Started Guide.