Class: TonLog

実行時ログをファイルに出力・管理します。ログファイルは log/ フォルダに保存されます。

Methods

void Info(string message)

情報レベルのログを出力します。

void Warning(string message)

警告レベルのログを出力します。

void Error(string message)

エラーレベルのログを出力します。

void Debug(string message)

デバッグレベルのログを出力します。

Sample Code

// Info log
Ton.log.Info("Game Started.");

// Warning
if (resourceMissing)
{
    Ton.log.Warning("Resource 'xyz' not found, using default.");
}

// Error (includes caller info automatically)
try 
{
    // ...
}
catch (Exception ex)
{
    Ton.log.Error($"Critical Failure: {ex.Message}");
}

// Logs are saved to 'log/ton.yyyymmdd.log'