Skip to main content

push_log

Function push_log 

Source
pub async fn push_log(
    client: &impl HttpClient,
    config: &EnvConfig,
    log: &BetterStackLogSchema,
) -> Option<Value>
Expand description

Pushes a log to the BetterStack logs server asynchronously and returns a value.

§Arguments

  • client - The HTTP client to use for sending the request.
  • config - The configuration of the server.
  • log - The log to be pushed.

§Returns

  • If the log is sent successfully, returns Some containing the continuation value.
  • If there is an error sending the log, prints the error message and returns None.