]> git.ipfire.org Git - thirdparty/haproxy.git/commit
REORG: include: move the error reporting functions to from log.h to errors.h
authorWilly Tarreau <w@1wt.eu>
Fri, 5 Jun 2020 15:27:29 +0000 (17:27 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 11 Jun 2020 08:18:59 +0000 (10:18 +0200)
commit36979d9ad54d82715307dc7c4771044e766c82e8
treef511032bbf67b26b47f34fc264d2da062e9cedca
parent251c2aae06a8aa6117ce7dcf2eb7a3fe02378344
REORG: include: move the error reporting functions to from log.h to errors.h

Most of the files dealing with error reports have to include log.h in order
to access ha_alert(), ha_warning() etc. But while these functions don't
depend on anything, log.h depends on a lot of stuff because it deals with
log-formats and samples. As a result it's impossible not to embark long
dependencies when using ha_warning() or qfprintf().

This patch moves these low-level functions to errors.h, which already
defines the error codes used at the same places. About half of the users
of log.h could be adjusted, sometimes revealing other issues such as
missing tools.h. Interestingly the total preprocessed size shrunk by
4%.
46 files changed:
contrib/modsecurity/modsec_wrapper.c
contrib/prometheus-exporter/service-prometheus.c
include/haproxy/cfgparse.h
include/haproxy/errors.h
include/haproxy/log.h
src/51d.c
src/acl.c
src/action.c
src/auth.c
src/cache.c
src/cfgparse-global.c
src/cfgparse-listen.c
src/cli.c
src/connection.c
src/da.c
src/extcheck.c
src/flt_trace.c
src/h1_htx.c
src/hlua.c
src/hlua_fcn.c
src/http_act.c
src/http_ana.c
src/http_htx.c
src/http_rules.c
src/mailers.c
src/mux_fcgi.c
src/mux_h2.c
src/mworker-prog.c
src/mworker.c
src/namespace.c
src/peers.c
src/pool.c
src/proto_sockpair.c
src/raw_sock.c
src/regex.c
src/sample.c
src/server.c
src/signal.c
src/sink.c
src/stats.c
src/stick_table.c
src/tcpcheck.c
src/trace.c
src/uri_auth.c
src/vars.c
src/wdt.c