my ($type, $msg) = @_;
return 0 if (!$main::opened_debug_log);
return 0 if ($gconfig{'debug_no'.$main::webmin_script_type});
+if ($gconfig{'debug_modules'}) {
+ my @dmods = split(/\s+/, $gconfig{'debug_modules'});
+ return 0 if (&indexof($main::initial_module_name, @dmods) < 0);
+ }
my $now = time();
my @tm = localtime($now);
my $line = sprintf
---- Changes since 1.480 ----
Removed the option to select an OSDN mirror, as Sourceforge now does sensible location-based redirects automatically.
Added an option on the Logging page to record logins and logouts from Webmin, for display in the Webmin Actions Log module.
+---- Changes since 1.490 ----
+Added a field to the Debugging Log File page to select modules to debug for.
$gconfig{'debug_nocmd'} = !$in{'debug_cmd'};
$gconfig{'debug_nocron'} = !$in{'debug_cron'};
+# Modules
+if ($in{'mall'}) {
+ delete($gconfig{'debug_modules'});
+ }
+else {
+ $in{'modules'} || &error($text{'debug_emodules'});
+ $gconfig{'debug_modules'} = join(' ', split(/\0/, $in{'modules'}));
+ }
+
# Write out
&write_file("$config_directory/config", \%gconfig);
&unlock_file("$config_directory/config");
&ui_checkbox("debug_cron", 1, $text{'debug_cron'},
!$gconfig{'debug_nocron'}));
+# Modules to debug
+# Modules to log in
+print &ui_table_row($text{'debug_inmods'},
+ &ui_radio("mall", $gconfig{'debug_modules'} ? 0 : 1,
+ [ [ 1, $text{'log_mall'} ], [ 0, $text{'log_modules'} ] ]).
+ "<br>\n".
+ &ui_select("modules", [ split(/\s+/, $gconfig{'debug_modules'}) ],
+ [ map { [ $_->{'dir'}, $_->{'desc'} ] }
+ sort { $a->{'desc'} cmp $b->{'desc'} }
+ &get_all_module_infos() ], 5, 1));
+
print &ui_table_end();
print &ui_form_end([ [ "save", $text{'save'} ] ]);
debug_edir=Directory '$1' for debug log file does not exist
debug_esize=Maximum size must be a number
debug_procs=Script types to debug
+debug_modules=Limit debugging to modules
debug_web=Web interface CGIs
debug_cmd=Command line
debug_cron=Background jobs
+debug_inmods=Modules to write debug logs for
+debug_emodules=No modules to debug for selected
notif_passexpired=Your Webmin password has expired! You will be forced to change it at the next login.
notif_passchange=Your Webmin password was last changed on $1, and must be changed in $2 days.