lambda_runtime 1.1.3

AWS Lambda Runtime
Documentation
1
2
3
4
5
6
7
8
9
10
// Logs using tracing `error!` if a dispatcher is set, otherwise falls back to `eprintln!`.
macro_rules! log_or_print {
    (tracing: $tracing_expr:expr, fallback: $fallback_expr:expr) => {
        if tracing::dispatcher::has_been_set() {
            $tracing_expr;
        } else {
            $fallback_expr;
        }
    };
}