Trying to determine a \"modern\" implementation for the following C-style code:
#define logError(...) log(__FILE__, __LINE__, __VA_ARGS__)
Macros are indeed your only choice, at least until std::source_location makes it into the standard and fulfills your wish.