NoaDebugger v1.0.0NoaDebugger v1.0.0
  • v1.6.1
  • v1.5.0
  • v1.4.0
  • v1.3.0
  • v1.2.0
  • v1.1.1
  • v1.0.0
Demo
Contact
Buy
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • v1.6.1
  • v1.5.0
  • v1.4.0
  • v1.3.0
  • v1.2.0
  • v1.1.1
  • v1.0.0
Demo
Contact
Buy
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • NoaConsoleLog

NoaConsoleLog

Through this class, you can obtain logs held by the ConsoleLog feature.

APIs

Static Methods

APIDescription
Add(LogType, message, stackTrace)Adds a log to be output to the ConsoleLog tool. If stackTrace is not specified, it automatically retrieves the stack trace.
Clear()Deletes all stored log information at once.

Static Properties

APIDescription
LogListReturns a list of the log information it retains.
OnErrorThis is an event that runs when an error is detected.

Sample Code

using System.Collections.Generic;
using UnityEngine;
#if NOA_DEBUGGER
using NoaDebugger;
#endif

public class Example
{
    void ExampleMethod()
    {
#if NOA_DEBUGGER

        // Get a list of log information retained by the ConsoleLog function.
        LinkedList<ConsoleLogEntry> consoleLogList = NoaConsoleLog.LogList;

        // Add logs to the ConsoleLog function.
        NoaConsoleLog.Add(UnityEngine.LogType.Error, "log_message", "log_stacktrace");

        // Add logs to the ConsoleLog function (without stack trace).
        NoaConsoleLog.Add(UnityEngine.LogType.Error, "log_message");

        // Set an event to be executed when an error is detected.
        NoaConsoleLog.OnError += (ConsoleLogEntry log) => Debug.Log("Error detected.");

        // Delete all logs.
        NoaConsoleLog.Clear();
#endif
    }
}