X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=src%2Flog.c;h=61a92d24994109f34c06f23a1b165a9440ebc096;hb=bb5f5ae82bdcb7b5189032940d0b609dc12be70b;hp=ebb5cd1c0ae1e4b4965da971df41a3484f538928;hpb=a7ffadd41a1457e24ffde19a081c4b8bffe1b3b8;p=umurmur.git diff --git a/src/log.c b/src/log.c index ebb5cd1..61a92d2 100644 --- a/src/log.c +++ b/src/log.c @@ -39,6 +39,7 @@ #include "log.h" #include "conf.h" +#include "util.h" #define STRSIZE 254 @@ -191,10 +192,11 @@ void Log_info_client(client_t *client, const char *logstring, ...) va_end(argp); offset += snprintf(&buf[offset], STRSIZE - offset, " - [%d] %s@%s:%d", - client->sessionId, - client->username == NULL ? "" : client->username, - inet_ntoa(client->remote_tcp.sin_addr), - ntohs(client->remote_tcp.sin_port)); + client->sessionId, + client->username == NULL ? "" : client->username, + Util_clientAddressToString(client), + Util_clientAddressToPortTCP(client)); + if (termprint) fprintf(stderr, "%s\n", buf); else if (logfile)