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/trace.c b/src/trace.c
index bb9db08..997a994 100644
--- a/src/trace.c
+++ b/src/trace.c
@@ -24,7 +24,7 @@
#include <haproxy/cli.h>
#include <haproxy/istbuf.h>
#include <haproxy/list.h>
-#include <proto/log.h>
+#include <haproxy/log.h>
#include <haproxy/sink.h>
#include <haproxy/trace.h>