EntityScriptServerLog

Description

Supported Script Types: Interface Scripts • Client Entity Scripts • Avatar Scripts

The EntityScriptServerLog API makes server log file output written by server entity scripts available to client scripts.

Methods

Name Return Value Summary
receivedNewLogLines None

Triggered when one or more lines are written to the server log by server entity scripts.

Method Details

(static) receivedNewLogLines( logLines )

Triggered when one or more lines are written to the server log by server entity scripts.

Parameters

Name Type Description
logLines string

The server log lines written by server entity scripts. If there are multiple lines they are separated by "\n"s.

Examples

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);
});

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!");
})