Merge pull request #16571 from ctrlaltdavid/DOC-243

DOC-243: EntityScriptServerLog JSDoc
This commit is contained in:
Brad Hefta-Gaub 2019-12-13 10:43:45 -08:00 committed by GitHub
commit 4c9129268d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,6 +16,16 @@
#include <NodeList.h>
/**jsdoc
* The <code>EntityScriptServerLog</code> 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 <code>"\n"</code>s.
* @example <caption>Echo server entity script program log output to Interface's program log.</caption>
* EntityScriptServerLog.receivedNewLogLines.connect(function (logLines) {
* print("Log lines from server entity scripts:", logLines);
* });
* @example <caption>A server entity script to test with. Copy the code into an entity's "Server Script" property.</caption>
* (function () {
* print("Hello from a server entity script!");
* })
*/
void receivedNewLogLines(QString logLines);
protected: