()
| 25 | |
| 26 | #[tokio::main] |
| 27 | async fn main() -> Result<(), Error> { |
| 28 | tracing_subscriber::fmt() |
| 29 | .with_env_filter( |
| 30 | EnvFilter::builder() |
| 31 | .with_default_directive(LevelFilter::INFO.into()) |
| 32 | .from_env_lossy(), |
| 33 | ) |
| 34 | // disable printing the name of the module in every log line. |
| 35 | .with_target(false) |
| 36 | // disabling time is handy because CloudWatch will add the ingestion time. |
| 37 | .without_time() |
| 38 | .init(); |
| 39 | |
| 40 | run(service_fn(function_handler)).await |
| 41 | } |