ClientLogger
Class finesse.cslogger.ClientLogger
Allows gadgets to send the client log messages over the hub by calling the log method of the clientLogger. This enables the container to collect the logs of the third-party gadget and make it available on the server.
Methods
init(hub, gadgetId, config)
Initiates the client logger object for the client logging messages.
Example
Parameters
Name |
Type |
Description |
Required |
---|---|---|---|
hub |
Object |
The Shindig hub topic that the gadgets wants to listen to. |
Yes |
gadgetId |
String |
Unique identifier of the gadget. |
Yes |
config |
Object |
The configuration data which is used to get the hostname for the third-party gadget. |
Yes |
log(message, error)
Publishes a log message over the hub.
Example
Parameters
Name |
Type |
Description |
Required |
---|---|---|---|
message |
String |
The log message displayed in the hub. |
Yes |
error |
Object |
The message that is associated with the error. |
Optional |