+/** start_log: open a log file */
+/* FIXME - parse command line arguments to set log levels etc */
+void start_log(int argc, char **argv)
+{
+ char logname[2048];
+ if (!argv)
+ return;
+ if (!argv[0])
+ return;
+ sprintf(logname, "%s.log", argv[0]);
+ yaz_log_init_file(logname);
+}
+
+/**
+ * start_up : do common start things, and a zebra_start
+ * - nmem_init
+ * - build the name of logfile from argv[0], and open it
+ * if no argv passed, do not open a log
+ * - read zebra.cfg from env var srcdir if it exists; otherwise current dir
+ * default to zebra.cfg, if no name is given
+ */
+ZebraService start_up(char *cfgname, int argc, char **argv)
+{
+ nmem_init();
+ start_log(argc, argv);
+ return start_service(cfgname);
+}