From 41b8addd15658d275d74d3d47b5595b91c2bbd06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sun, 13 Feb 2011 20:37:29 +0200 Subject: Log nonexistent user name as "-". --- vdradmind.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vdradmind.pl b/vdradmind.pl index 128b114..f59e558 100755 --- a/vdradmind.pl +++ b/vdradmind.pl @@ -3704,7 +3704,7 @@ sub access_log { my $bytes_transfered = shift; my $request = shift; my $useragent = shift; - return sprintf("%s %s \"%s\" %s %s \"%s\" \"%s\"", $ip, $username, $rawrequest, $http_status ? $http_status : "-", $bytes_transfered ? $bytes_transfered : "-", $request, $useragent); + return sprintf("%s %s \"%s\" %s %s \"%s\" \"%s\"", $ip, defined($username) ? $username : "-", $rawrequest, $http_status ? $http_status : "-", $bytes_transfered ? $bytes_transfered : "-", $request, $useragent); } sub ValidConfig { -- cgit v1.2.3