The stacktrace generation is now a part of the maxbase library. The code
is the same code that was previously defined in gateway.cc as a part of
MaxScale.
The only way to cleanly separate the maxutils library from the MaxScale
CMake project is to make it a standalone CMake project. With the help of
ExternalProject, it should be relatively easy to use.
The purpose of this library is to create a utility library that is not
dependent on maxscale for use in both maxscale and system test, and
possibly other apps. As time permits general purpose utilities from
maxscale-common can be moved to the new library.
Here are answers to questions you may have:
- A top level directory "maxutils" contains the libraries. The current
structure is simply maxutils/maxbase. Each library has an 'include' and
a 'scr' directory where public headers exist in 'include'
- Code is in a namespace with the same name as the directory.
- Headers are included like this: `#include <maxbase/stopwatch.hh>`
- In case the library is published on its own, the include directives stay
the same (headers would be in /usr/include/maxutil, for example).
- I am not advocating many small libraries. But if some larger library
is written, say a general purpose statemachine, it would not pollute
util/maxutil but go to util/maxsm.
Another example: Worker. It is a larger concept, but used so widely in
code that it could very well live in maxutil.
NOTE: this was previously Review Request #6245.