diff --git a/libraries/entities/src/EntityScriptServerLogClient.h b/libraries/entities/src/EntityScriptServerLogClient.h index 22245e2a4e..6d3dec16e2 100644 --- a/libraries/entities/src/EntityScriptServerLogClient.h +++ b/libraries/entities/src/EntityScriptServerLogClient.h @@ -16,6 +16,16 @@ #include +/**jsdoc + * The EntityScriptServerLog API makes server log file output written by server entity scripts available to client + * scripts. + * + * @namespace EntityScriptServerLog + * + * @hifi-interface + * @hifi-client-entity + * @hifi-avatar + */ class EntityScriptServerLogClient : public QObject, public Dependency { Q_OBJECT @@ -23,6 +33,21 @@ public: EntityScriptServerLogClient(); signals: + + /**jsdoc + * Triggered when one or more lines are written to the server log by server entity scripts. + * @function EntityScriptServerLog.receivedNewLogLines + * @param {string} logLines - The server log lines written by server entity scripts. If there are multiple lines they are + * separated by "\n"s. + * @example Echo server entity script program log output to Interface's program log. + * EntityScriptServerLog.receivedNewLogLines.connect(function (logLines) { + * print("Log lines from server entity scripts:", logLines); + * }); + * @example A server entity script to test with. Copy the code into an entity's "Server Script" property. + * (function () { + * print("Hello from a server entity script!"); + * }) + */ void receivedNewLogLines(QString logLines); protected: