NoaDebugger v1.3.0NoaDebugger v1.3.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
  • NoaApiLog

NoaApiLog

Through this class, you can obtain logs held by the APILog function.

APIs

Static Methods

APIDescription
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.
OnLogCopiedThis event is triggered when a log is copied to the clipboard.
OnLogDownloadThis event is triggered when a log is downloaded.
If the event handler returns true, the logs will be downloaded locally. If the event handler returns false, the logs will not be downloaded.

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 APILog function.
        LinkedList<ApiLogEntry> apiLogList = NoaApiLog.LogList;

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

        // Set up the event that is triggered when a log is copied to the clipboard
        NoaApiLog.OnLogCopied += (ApiLogEntry log, string clipboardText) => Debug.Log($"Log copied. Clipboard: {clipboardText}");

        // Set up the event that is triggered when a log is downloaded
        NoaApiLog.OnLogDownload += (string filename, string jsonData) =>
        {
            Debug.Log($"Logs download. Filename: {filename}");
            // Return true to allow local download
            // Return false to prevent local download
            return true;
        };

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