extism / dotnet-pdk

Extism Plug-in Development Kit (PDK) for C# and F#
https://extism.org
BSD 3-Clause "New" or "Revised" License
44 stars 6 forks source link

Avoid allocation log messages for disabled log levels #107

Open zshipko opened 4 weeks ago

zshipko commented 4 weeks ago

We can use extism:host/env::get_log_level to determine if the selected log level is enabled, if it's not we can avoid allocating the log message.