Hacker News new | ask | show | jobs
by memco 1063 days ago
I was curious after reading: can the @disable behavior be modified at runtime? For long running programs I find it helpful to be able to set a certain log level up front but have a way to update it without rebuilding or restarting the program. There may be other operations that can’t immediately be shut down and restarted so requiring a rebuild or restart to get debug logs is not an option in those cases.
1 comments

It cannot, it's purely a build-time feature. The disabled proc isn't even in the binary if you disassemble it.

Also for the record I just noticed I wrote @disable everywhere instead of @disabled. That's been fixed now