Try to make the log use an internal funciton rather than macro.