refactor log, use Printf func signature, more flexible