2012-03-07 18:23:41 +00:00
|
|
|
(* Copyright 2012 Tony Garnock-Jones <tonygarnockjones@gmail.com>. *)
|
|
|
|
|
|
|
|
(* This file is part of Ocamlmsg. *)
|
|
|
|
|
|
|
|
(* Ocamlmsg is free software: you can redistribute it and/or modify it *)
|
|
|
|
(* under the terms of the GNU General Public License as published by the *)
|
|
|
|
(* Free Software Foundation, either version 3 of the License, or (at your *)
|
|
|
|
(* option) any later version. *)
|
|
|
|
|
|
|
|
(* Ocamlmsg is distributed in the hope that it will be useful, but *)
|
|
|
|
(* WITHOUT ANY WARRANTY; without even the implied warranty of *)
|
|
|
|
(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *)
|
|
|
|
(* General Public License for more details. *)
|
|
|
|
|
|
|
|
(* You should have received a copy of the GNU General Public License *)
|
|
|
|
(* along with Ocamlmsg. If not, see <http://www.gnu.org/licenses/>. *)
|
|
|
|
|
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 _ =
|
2012-03-07 18:23:41 +00:00
|
|
|
Printf.printf "%s %s, %s\n%s\n%!"
|
|
|
|
App_info.product App_info.version App_info.copyright App_info.licence_blurb;
|
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 ();
|
2012-03-05 21:56:43 +00:00
|
|
|
Fanoutnode.init ();
|
2012-03-04 17:12:20 +00:00
|
|
|
Directnode.init ();
|
2012-03-06 22:05:57 +00:00
|
|
|
Meta.init ();
|
2012-01-08 19:48:07 +00:00
|
|
|
hook_log ();
|
2012-03-04 18:03:38 +00:00
|
|
|
Amqp_relay.init ();
|
2012-03-06 16:42:44 +00:00
|
|
|
(* Speedtest.init (); *)
|
2012-04-28 13:41:10 +00:00
|
|
|
Net.start_net "Hop" 5671 Relay.start
|