logging: add printf-style logging macros