Functions Logger Service
Logger Websocket endpoints
Connector functions logger feature is available on this URL: wss://api.opengate.es/north/functions-logger/connectorFunctions/organizations/{organization_name}/channels/{channel_name}/{cf-id}
Rules logger feature is available on this URL: wss://api.opengate.es/north/functions-logger/rules/organizations/{organization_name}/channels/{channel_name}/{rf-id}
Websocket requires mandatory X-ApiKey
url parameter to work
Another parameter to be set is logging level, used to define which traces must be sent to the client. This paremter is not mandatory and by default INFO level will be used.
Here is complete URI example for connector functions logger:
wss://api.opengate.es/north/functions-logger/connectorFunctions/organizations/{organization_name}/channels/{channel_name}/{cf-id}?X-ApiKey={your-api-key}&level={logging-level}
Where:
organization_name
: Organization name.channel_name
: Channel name.cf-id
: Connector function identifier.your-api-key
: Api-key for valid user wit permissions over defined function.logging-level
: Specify logging granularity. Valid logging levels:ERROR
,WARN
,INFO
,DEBUG
,TRACE
. If incorrect value is defined,INFO
level will be used by Functions Logger service. Same level or higher level messages will be received. For example ifWARN
is defined in the path,ERROR
andWARN
traces will be received, but notINFO
,DEBUG
orTRACE
.
After opening Websocket connection, the client will receive log messages with following format:
{
"message": "message.",
"level": "INFO",
"timestamp": 1607108000000
}
Where
message
: Printed trace in connector function.level
: Trace level. Possible values:ERROR
,WARN
,INFO
,DEBUG
,TRACE
.timestamp
: Trace UTC timestamp in milliseconds.