These kind of global APIs are just great.
The best practice these days is to combine them in a namespace:
namespace LOGGING { void writeError(message, ...); }
Creating something static in C ++ is not the same as doing something static in Java. In C ++, a static function is visible only from this compilation unit (.cpp file). This does not make it a global non-class function.
The static member function in C ++, however, is the same in Java - it allows it to be called because of the object object class class :: method (params) instead of classObject.method (params).
source share