Hi guys. The Kermit <website> says "Disable local ...
# touchlab-tools
h
Hi guys. The Kermit website says "Disable local logging for production, or even strip log statements altogether with a compiler plugin". I am interested in the latter i.e. "strip log statements altogether with a compiler plugin". Is such a compiler plugin available? I couldn't find any information on that. If it exists, can somebody please point me to it?
k
There was. The code is still there (https://github.com/touchlab/Kermit/tree/main/plugin), but we'd need to update it. I added it maybe 2 years ago, as it seemed pretty useful, but we never used it, and nobody I'm aware of did either, so I didn't prioritize it when we did v2. Will add an issue to review bringing that back. It did quite literally just "erase" all logging calls.
h
Thank you, Kevin. It would great to have the ability to "erase" the logging calls.
i
Hey, Any updates on this. Any other way to strip logs? Thanks!
k
No updates. been fully busy with tons of other stuff.
i
So there’s absolutely no way to remove logs? I guess if we set min severity, we can turn the logs off, right?
k
Oh, yeah! Just set the log level. What we're talking about here was a compiler plugin that actually removed all logging calls from the binary itself. In theory, that would make the binary slightly smaller and have a slight performance increase, but it really wasn't used by anybody. If you just want to prevent logs from being written, set the min severity.