Commit Graph

70 Commits

Author SHA1 Message Date
5b46d815e4 MXS-2014 Move message status checking into MessageRegistry 2018-08-16 09:59:43 +03:00
79b292dc39 MXS-2014 Additional cleanup of log.cc 2018-08-16 09:59:43 +03:00
5b70c7605c MXS-2014 Some cleanup of log.cc
Unused stuff removed and unit variables collected into this_unit
structure.
2018-08-16 09:59:43 +03:00
0c479b5d13 MXS-2014 Enable asserts in log.cc 2018-08-16 09:59:43 +03:00
6b6bbceb6e MXS-2014 Add maxbase/assert.h
Basically a copy of maxscale/debug.h, but with some name changes.

- ss_dassert      -> mxb_assert
- ss_info_dassert -> mxb_assert_message
- ss_debug        -> MXB_AT_DEBUG
2018-08-16 09:59:43 +03:00
52e6e10e28 MXS-2014 Remove duplicate function
Two functions that essentially did the same thing, but had
slightly different name.
2018-08-16 09:58:00 +03:00
b4912a942f MXS-2014 Add missing MXB_[BEGIN|END]_DECLS 2018-08-16 09:58:00 +03:00
a191ed85a2 MXS-2014 Expose everything needed by the MaxScale log manager 2018-08-16 09:58:00 +03:00
1a6eb8165a MXS-2014 Add log.[h|cc] to maxbase
Almost a verbatim copy of log_manager.[h|cc] with mxs changed
to mxb. The changes allow the MaxScale log manager to be moved
on top of this implementation.
2018-08-16 09:58:00 +03:00
17418572f9 MXS-2014 Move maxscale/jansson.h to maxbase/jansson.h 2018-08-16 09:58:00 +03:00
be4f9125f0 Fix mxb_strerror
The function should not be an inline function with a static variable. This
appears to cause problems on at least Debian Wheezy and is likely to cause
odd behavior on other platforms.

Also renamed the file to <maxbase/string.h> to better mirror how the
<string.h> file behaves.
2018-08-15 14:58:46 +03:00
f3f802cabe MXS-2008 Move maxscale/atomic.h to maxbase/atomic.h 2018-08-15 08:44:39 +03:00
d53bc9d3be MXS-2008 Move maxscale/semaphore.h to maxbase/semaphore.h 2018-08-15 08:41:45 +03:00
c543525c1b MXS-2005: Move Logger into maxutils
Moved the logger into the maxutils library as it is a generic
utility. Also moved mxs_strerror into it as it depends on it.
2018-08-14 14:57:34 +03:00
cc0299aee6 Update change date of 2.3 2018-06-25 10:07:52 +03:00
c32e6a7c3f Add stacktrace generation to maxbase
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.
2018-06-22 13:59:57 +03:00
7254a7c525 Make maxutils a standalone library
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.
2018-06-22 13:59:57 +03:00
9c6c0a4d95 Add common headers to maxbase
To be included first in all headers. Defined and included common
ground and provides a place when one can affect all code.
2018-06-20 09:53:19 +03:00
d2e1cfdf4e MXS-1777 fix CMakeLists.txt for utility library
Last minute directory changes were not fully applied in CMakeLists.txt
2018-06-18 15:27:44 +03:00
2514c99d9e MXS-1777 Create new utility library
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.
2018-06-15 12:05:57 +03:00