Plugins

Covers Engine Plugin SDK 2.0.0 · Interface Plugin SDK 0.2.0

SDK_API::writeLog

Appends text to an ARGUS log stream without creating an operator event. Plugin calls use a plugin-qualified stream name, such as `ethercat/Bus`. The engine supplies the node, session, timestamp, and sequence. Writes are asynchronous and return false if the bounded queue is full.

Declaration

virtual bool writeLog(const std::string& stream, const std::string& text,
            const std::string& channel = "stdout", const std::string& level = "info") {
            (void)stream;
            (void)text;
            (void)channel;
            (void)level;
            return false;
        }

Parameters

NameDescription
streamPlugin-local stream name, such as Bus.
textText to append; a trailing newline is optional.
channelstdout or stderr for console-style coloring.
levelinfo, warning, or error for filtering.

Returns

Whether ARGUS accepted the text for writing.

Example

api.writeLog("Bus", "Device connected", "stdout", "info");