REORG: include: move log.h to haproxy/log{,-t}.h
The current state of the logging is a real mess. The main problem is
that almost all files include log.h just in order to have access to
the alert/warning functions like ha_alert() etc, and don't care about
logs. But log.h also deals with real logging as well as log-format and
depends on stream.h and various other things. As such it forces a few
heavy files like stream.h to be loaded early and to hide missing
dependencies depending where it's loaded. Among the missing ones is
syslog.h which was often automatically included resulting in no less
than 3 users missing it.
Among 76 users, only 5 could be removed, and probably 70 don't need the
full set of dependencies.
A good approach would consist in splitting that file in 3 parts:
- one for error output ("errors" ?).
- one for log_format processing
- and one for actual logging.
diff --git a/src/raw_sock.c b/src/raw_sock.c
index 3453aac..099f503 100644
--- a/src/raw_sock.c
+++ b/src/raw_sock.c
@@ -26,6 +26,7 @@
#include <haproxy/buf.h>
#include <haproxy/connection.h>
#include <haproxy/global.h>
+#include <haproxy/log.h>
#include <haproxy/stream_interface.h>
#include <haproxy/tools.h>
#include <haproxy/ticks.h>
@@ -33,7 +34,6 @@
#include <haproxy/fd.h>
#include <haproxy/freq_ctr.h>
-#include <proto/log.h>
#include <haproxy/pipe.h>