Show / Hide Table of Contents
Last modified: 2024-09-14

Runtime.Log Method

Sends a log message to the client executing the smart contract. This method can trigger an event on the client but requires the client to be compatible.

Namespace: Neo.SmartContract.Framework.Services

Assembly: Neo.SmartContract.Framework

Syntax

public static extern void Log(string message)

Parameters:

  • message: Log as a string.

Example

public class Contract1 : SmartContract.Framework.SmartContract
{
    public static void Main(bool debug)
    {
        if(debug)
        {
            Runtime.Log("Execution successful");
        }
    }
}

Back