Skip to main content

Module SkyEmit

Module SkyEmit 

Source
Expand description

Central sky:// emit wrapper that logs under the sky-emit DevLog tag. Optional drop-in for any ApplicationHandle::emit(channel, …) call site; existing emits keep working unchanged.

§SkyEmit

Wrapper over tauri::Emitter::emit(channel, payload) that logs every Mountain → Wind/Sky emit under the sky-emit DevLog tag. Drop-in replacement for handle.emit(channel, payload) at any call site that benefits from per-channel traffic instrumentation.

§When to use

Prefer LogSkyEmit over bare emit for any sky://... channel the user might want to audit. The existing ~50+ emit sites remain compatible - convert them incrementally as you touch nearby code.

§Output shape

Each successful emit produces:

[DEV:SKY-EMIT] [SkyEmit] ok channel=sky://tree-view/create bytes=64

Failures produce:

[DEV:SKY-EMIT] [SkyEmit] fail channel=sky://… bytes=64 error=<reason>

§Tag filtering

Trace=sky-emit tail -f Mountain.dev.log shows the stream on its own so you can audit exactly which channels are being emitted, in what order, and with what payload size - without re-running or adding ad-hoc prints.

Functions§

LogSkyEmit
Emit a tagged log line around any ApplicationHandle::emit. Returns the same Result as the underlying emit so callers using let _ = … / ? / if let Err(e) = … keep their existing shape.