using templete instead of macro in log