Change log_* macros to check for NULL log function
Add log severity macros for compile-time constness