implementation of log::printf