Fix logging configuration and macros