(** perform an 'action' that can be applied to a list of keys or, if no keys
was given, to all keys *)
-let act_on_keys keys_param styles logger per_key_action all_keys_action logmsg
+let act_on_keys
+ keys_param styles logger per_key_action all_keys_action all_keys logmsg
=
let keys =
try
in
match keys with
| [] -> (* no key provided, act on all stylesheets *)
- logger#log (sprintf "%s all stylesheets ..." logmsg);
- (try all_keys_action () with e -> logger#log (Printexc.to_string e))
+ logger#log (sprintf "%s all stylesheets (keys = %s) ..."
+ logmsg (String.concat ", " all_keys));
+ (try all_keys_action () with e -> logger#log (Printexc.to_string e));
+ logger#log (sprintf "Done! (all stylesheets)")
| keys ->
List.iter
(fun key -> (* act on a single stylesheet *)
logger#log (sprintf "%s stylesheet %s" logmsg key);
- (try per_key_action key with e -> logger#log (Printexc.to_string e)))
+ (try per_key_action key with e -> logger#log (Printexc.to_string e));
+ logger#log (sprintf "Done! (stylesheet %s)" key))
keys
;;
arg styles logger
(fun key -> log_libxslt_msgs logger (styles#remove key))
(fun () -> log_libxslt_msgs logger styles#removeAll)
+ styles#keys
"removing";
output_string res_pipe (logger#asHtml);
raise Restart_HTTP_daemon
arg styles logger
(fun key -> log_libxslt_msgs logger (styles#reload key))
(fun () -> log_libxslt_msgs logger styles#reloadAll)
+ styles#keys
"reloading";
output_string res_pipe (logger#asHtml);
raise Restart_HTTP_daemon