MCPcopy Create free account
hub / github.com/chirpstack/chirpstack / log_event

Method log_event

chirpstack/src/integration/mqtt.rs:340–357  ·  view source on GitHub ↗
(
        &self,
        _vars: &HashMap<String, String>,
        pl: &integration::LogEvent,
    )

Source from the content-addressed store, hash-verified

338 }
339
340 async fn log_event(
341 &self,
342 _vars: &HashMap<String, String>,
343 pl: &integration::LogEvent,
344 ) -> Result<()> {
345 let dev_info = pl
346 .device_info
347 .as_ref()
348 .ok_or_else(|| anyhow!("device_info is None"))?;
349
350 let topic = self.get_event_topic(&dev_info.application_id, &dev_info.dev_eui, "log")?;
351 let b = match self.json {
352 true => serde_json::to_vec(&pl)?,
353 false => pl.encode_to_vec(),
354 };
355
356 self.publish_event(&topic, b).await
357 }
358
359 async fn status_event(
360 &self,

Callers 2

_log_eventFunction · 0.45
test_mqttFunction · 0.45

Calls 3

as_refMethod · 0.80
get_event_topicMethod · 0.80
publish_eventMethod · 0.45

Tested by 1

test_mqttFunction · 0.36