What are best practices on logging in C code for port drivers/NIFs/etc.? Obviously, what I currently do in https://github.com/alexeyr/erlang-sqlite3/blob/master/c_src/sqlite3_drv.c is bad (especially in multiuser environment). But how _should_ it be done instead? Yours, Alexey Romanov