hop-2012/ocamlmsg.ml

22 lines
565 B
OCaml
Raw Normal View History

2012-01-08 19:48:07 +00:00
let hook_log () =
let old_hook = !Log.hook in
let new_hook label body =
ignore (Node.post "system.log" (Sexp.Str label) body (Sexp.Str ""));
old_hook label body
in
Log.hook := new_hook
2012-01-08 17:41:04 +00:00
let _ =
Printf.printf "%s %s, %s %s\n%!"
App_info.product App_info.version App_info.copyright App_info.licence;
2012-01-08 19:02:18 +00:00
Sys.set_signal Sys.sigpipe Sys.Signal_ignore;
2012-01-08 17:41:04 +00:00
Uuid.init ();
Factory.init ();
Queuenode.init ();
Fanoutnode.init ();
Directnode.init ();
2012-01-08 19:48:07 +00:00
hook_log ();
Amqp_relay.init ();
(* Speedtest.init (); *)
Net.start_net 5671 Relay.start