1. Script object OG.Log

    Article: AN0002176Updated:

    This object offers functions for work with ObjectGears application log.

    Script functions

    Name Description
    void Write(string errorMessage) Method writes a record into the log.
    void Write(Exception exception) Method writes a record into the log.
    void Write(string errorMessage, string stackTrace) Method writes a record into the log.
    void Write(object obj, string stackTrace) Method writes a record into the log.
    void WriteInfo(string message) Method writes a information into the log.
    void WriteVariableInfo(string name, object data)

    Method writes information about the property into the error log. Name is a property name and data is property value.

    Values are written into the log in this format:

    name (type): data

    Type is defined by the parameter data.

    void WriteException(Exception ex, IModuleInterface module) Method writes an exception into the log. The function is intended for writing exceptions from modules.
    void Print(string message) Method writes text to the output when the script is executed in the Script window.

    Object call

    OG.Log

×