using AIStudio.Tools.Rust; namespace AIStudio.Tools.Services; public sealed partial class RustService { /// /// Get the paths of the log files. /// /// The paths of the log files. public async Task GetLogPaths() { return await this.http.GetFromJsonAsync("/log/paths", JSON_OPTIONS); } /// /// Queues a log event for the Rust runtime. /// /// When the log event happened, formatted by TerminalLogger.FormatTransportTimestamp. /// The log level. /// The category of the log event. /// The log message. /// Optional exception message. /// Optional exception stack trace. /// /// Never waits: the event joins the queue of RustLogForwarder, which sends it in a batch. /// public void LogEvent(string timestamp, string level, string category, string message, string? exception = null, string? stackTrace = null) { this.logForwarder.Enqueue(new LogEventRequest(timestamp, level, category, message, exception, stackTrace)); } }