mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-11-23 12:10:21 +00:00
Improved logging
This commit is contained in:
parent
15d7359c59
commit
0125215111
@ -40,15 +40,17 @@ public partial class RustService
|
|||||||
// Deserialize the Tauri event:
|
// Deserialize the Tauri event:
|
||||||
var tauriEvent = JsonSerializer.Deserialize<TauriEvent>(line, this.jsonRustSerializerOptions);
|
var tauriEvent = JsonSerializer.Deserialize<TauriEvent>(line, this.jsonRustSerializerOptions);
|
||||||
|
|
||||||
// Log the received event for debugging:
|
|
||||||
this.logger!.LogDebug("Received Tauri event: {Event}", tauriEvent);
|
|
||||||
|
|
||||||
// Forward relevant events to the message bus:
|
// Forward relevant events to the message bus:
|
||||||
if (tauriEvent != default && tauriEvent.EventType is not TauriEventType.NONE
|
if (tauriEvent != default && tauriEvent.EventType
|
||||||
and not TauriEventType.UNKNOWN and not TauriEventType.PING)
|
is not TauriEventType.NONE
|
||||||
|
and not TauriEventType.UNKNOWN
|
||||||
|
and not TauriEventType.PING)
|
||||||
|
{
|
||||||
|
this.logger!.LogDebug("Received Tauri event {EventType} with {NumPayloadItems} payload items.", tauriEvent.EventType, tauriEvent.Payload.Count);
|
||||||
await MessageBus.INSTANCE.SendMessage(null, Event.TAURI_EVENT_RECEIVED, tauriEvent);
|
await MessageBus.INSTANCE.SendMessage(null, Event.TAURI_EVENT_RECEIVED, tauriEvent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// The cancellation token was triggered, exit the loop:
|
// The cancellation token was triggered, exit the loop:
|
||||||
catch (OperationCanceledException)
|
catch (OperationCanceledException)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user