NOA DebuggerNOA Debugger
  • v1.7.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
  • 日本語
  • English
  • v1.7.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
  • 日本語
  • English
  • NoaApiLogDownloadCallbacks

NoaApiLogDownloadCallbacks

Configure events related to APILog downloads.

By passing a class that inherits NoaApiLogDownloadCallbacks to NoaApiLog, you can customize download-related events.

Overridable Members

Methods

NameDescription
OnBeforeConversion(logEntries)Executes before converting the target data to a string for download. Both the argument and return value are IReadOnlyList<ApiLogEntry>. If you return edited values, they will be reflected in NOA Debugger’s JSON conversion process.
OnBeforeDownload(info)Refer to NoaDownloadCallbacks.OnBeforeDownload(info).
OnAfterDownload(info, status)Refer to NoaDownloadCallbacks.OnAfterDownload(info, status).

Properties

NameDescription
IsAllowBaseDownloadRefer to NoaDownloadCallbacks.IsAllowBaseDownload.

Related Types

INoaApiLogDownloadCallbacks

NoaApiLogDownloadCallbacks.OnBeforeConversion is defined in this interface.

If you want to consolidate multiple callback definitions in a custom class, or add callback functionality while inheriting an existing custom class, you can achieve this by using this interface instead of the NoaApiLogDownloadCallbacks class.

Sample Code

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

// Example of executing events before and after NOA Debugger’s APILog download process (using a class)
public class ExampleApiLogDownloader : NoaApiLogDownloadCallbacks
{
    public override IReadOnlyList<ApiLogEntry> OnBeforeConversion(IReadOnlyList<ApiLogEntry> logEntries)
    {
        Debug.Log($"Logs download. Count: {logEntries.Count}");

        // Example of excluding test logs from the download target.
        return logEntries.Where(entry => !entry.LogString.Contains("Test")).ToList();
    }

    // You can also use methods from the base NoaDownloadCallbacks.
    public override NoaDownloadInfo OnBeforeDownload(NoaDownloadInfo info)
    {
        info.FileName = $"Sample-{info.FileName}";
        return info;
    }

    public override void OnAfterDownload(NoaDownloadInfo info, NoaDownloadStatus status)
    {
        Debug.Log($"Download finished with status: {status}");
    }
}

// Example of implementing shared processing across multiple features (using the interface)
public class ExampleCommonDownloader : INoaDownloadCallbacks
{
    // Set IsAllowBaseDownload to true to allow NOA Debugger’s download process.
    public bool IsAllowBaseDownload => true;

    public NoaDownloadInfo OnBeforeDownload(NoaDownloadInfo info)
    {
        Debug.Log($"Download file name: {info.FileName}");
        return info;
    }

    public void OnAfterDownload(NoaDownloadInfo info, NoaDownloadStatus status)
    {
        Debug.Log($"Download finished with status: {status}");
    }
}

public class ExampleDerivedApiLogDownloader : ExampleCommonDownloader, INoaApiLogDownloadCallbacks
{
    public IReadOnlyList<ApiLogEntry> OnBeforeConversion(IReadOnlyList<ApiLogEntry> logEntries)
    {
        Debug.Log($"Logs download. Count: {logEntries.Count}");
        return logEntries;
    }
}
#endif

Links

Related Features

  • APILog
  • About Download

Classes Used

  • NoaApiLog

Core Class

  • NoaDownloadCallbacks