pub async fn send_log_entry<S: AsRef<str>>(
    socket: &mut AsyncSocket,
    msg: S
) -> Result<()>
Expand description

Generates a system log entry from the given msg and sends it to the given socket.

This mimics logs generated using //src/lib/diagnostics/data. These logs include:

  • A timestamp in nanoseconds when the log was generated.
  • The URL of the component generating the log.
  • The component moniker (https://fuchsia.dev/fuchsia-src/reference/components/moniker)
  • The log severity, e.g. fatal, error, warning, etc.
  • The log message.

See also writer::Writer::log which formats these entries for display.