+void
+parse_opts_opt_l(Config *cfg, int argc, char *argv[], int i)
+{
+ int log_level;
+
+ if (i < argc) {
+ char *param = argv[i++];
+
+ if (is_pos_num(param)) {
+ log_level = atoi(param);
+ if (log_level <= Debug) {
+ cfg->log_level = log_level;
+ opts_parse_any(cfg, argc, argv, i);
+ } else {
+ usage("Option -l value (%d) exceeds maximum (%d)\n", log_level, Debug);
+ }
+ } else {
+ usage("Option -l parameter is invalid: \"%s\"\n", param);
+ }
+ } else {
+ usage("Option -l parameter is missing.\n");
+ }
+}
+