proxy-wasm / proxy-wasm-cpp-sdk

WebAssembly for Proxies (C++ SDK)
Apache License 2.0
139 stars 67 forks source link

Consider implementing Wasm-side log level #153

Open martijneken opened 1 year ago

martijneken commented 1 year ago

In the Rust SDK (and Rust in general) there's a built-in configurable log level: https://docs.rs/log/latest/log/fn.set_max_level.html

The Rust logger does Wasm-side log filtering based on level: https://github.com/proxy-wasm/proxy-wasm-rust-sdk/blob/master/src/logger.rs#L51-L53

This would be nice to have in C++ also. Currently every C++log message is transmitted to the host: https://github.com/proxy-wasm/proxy-wasm-cpp-sdk/blob/master/proxy_wasm_api.h#L61-L92