Reorder min and logging macros