2 # Defines editors for logging
4 sub mod_log_common_directives
6 $rv = [ [ 'TransferLog', 0, 3, 'virtual', -1.2 ] ];
7 return &make_directives($rv, $_[0], "mod_log_common");
13 $rv = sprintf "<input type=radio name=TransferLog_mode value=0 %s> Default\n",
14 $_[0] ? "" : "checked";
15 $rv .= sprintf "<input type=radio name=TransferLog_mode value=1 %s> File..",
16 $_[0] && $_[0]->{'value'} !~ /^\|/ ? "checked" : "";
17 $rv .= sprintf "<input type=radio name=TransferLog_mode value=2 %s> Program..",
18 $_[0]->{'value'} =~ /^\|/ ? "checked" : "";
19 $rv .= sprintf "<input name=TransferLog size=20 value=\"%s\">\n",
20 $_[0]->{'value'} =~ /^\|(.*)$/ ? $1 : $_[0]->{'value'};
21 return (1, "Access log file", $rv);
25 if ($in{'TransferLog_mode'} == 0) { return ( [ ] ); }
26 $in{'TransferLog'} =~ /^\S+$/ ||
27 &error("$in{'TransferLog'} is not a valid access log filename");
28 &allowed_auth_file($in{'TransferLog'}) ||
29 &error("access log is not under the allowed directory");
30 if ($in{'TransferLog_mode'} == 1) { return ( [ $in{'TransferLog'} ] ); }
31 else { return ( [ "|$in{'TransferLog'}" ] ); }