2 # Save options for report source and dest
4 require './sarg-lib.pl';
7 $config_prefix = "log_";
8 &error_setup($text{'log_err'});
11 if ($in{'access_log_def'} == 0) {
12 &save_directive($conf, "access_log", [ ]);
14 elsif ($in{'access_log_def'} == 1) {
15 &save_directive($conf, "access_log", [ $in{'squid_log'} ]);
18 &save_textbox($conf, "access_log", \&check_log);
20 &save_opt_textbox($conf, "output_dir", \&check_output_dir);
21 &save_opt_textbox($conf, "lastlog", \&check_lastlog);
22 &save_opt_textbox($conf, "useragent_log", \&check_log);
23 &save_opt_textbox($conf, "squidguard_log_path", \&check_log);
24 &save_opt_textbox($conf, "output_email", \&check_email);
25 &save_opt_textbox($conf, "mail_utility", \&check_mailx);
34 return -r $_[0] ? undef : $text{'log_elog'};
39 return -d $_[0] ? undef : $text{'log_edir'};
44 return $_[0] =~ /^\d+$/ ? undef : $text{'log_elastlog'};
49 return $_[0] =~ /^\S+$/ ? undef : $text{'log_eemail'};
54 return $_[0] =~ /^(\S+)/ && &has_command($1) ? undef : $text{'log_emailx'};