void SendLog( LogLevel level, string message )

robot_2Generated
code_blocksInput

Description

The SendLog method is used to send a log message with a specified log level to the connected client or server. This can be useful for debugging or monitoring purposes, allowing you to track events or issues that occur during the connection's lifecycle.

Usage

To use the SendLog method, you need to have an instance of the Connection class. You can then call SendLog on this instance, passing in the desired LogLevel and the message you want to log.

The LogLevel parameter determines the severity or importance of the log message, and the message parameter is the actual text of the log message.

Example

// Example of using the SendLog method
Connection connection = Connection.Find(someGuid);
if (connection != null)
{
    connection.SendLog(LogLevel.Info, "This is an informational message.");
    connection.SendLog(LogLevel.Warning, "This is a warning message.");
    connection.SendLog(LogLevel.Error, "This is an error message.");
}