haproxy/tests/test-log.cfg
Willy Tarreau fe94460d53 [BUG] fix calls to localtime()
localtime() was called with pointers to tv_sec, which is time_t on
some platforms and long on others. A problem was encountered on
Sparc64 under OpenBSD where tv_sec is long (64 bits) and time_t is
32 bits. Since this architecture is big-endian, it exhibited the
bug because localtime() always worked with the high part of the
value which is always zero. This problem was identified and debugged
by Thierry Fournier.

The correct solution is to pass the date by value and not by pointer,
through an intermediate function. The use of localtime_r() instead of
localtime() also made it possible to get rid of the first call to
localtime() since it does not need to allocate memory anymore.
2007-10-25 10:34:16 +02:00

25 lines
525 B
INI

# This is a test configuration.
# Its purpose is simply to emit logs on the loopback in order to verify
# that the time is correct. To be used with tcpdump on lo, or with
# "strace -s100 -esendto".
global
log 127.0.0.1:514 local0
defaults
balance uri
contimeout 5000
clitimeout 5000
srvtimeout 5000
listen http
log global
log 127.0.0.1:514 local0
option httplog
mode http
bind :8000
option dontlognull
balance roundrobin
server tux 127.0.0.1:65535 check inter 1000