if (ctx != NULL) {
ctx->daemon_bus = mrp_event_bus_get(ctx->ml, MRP_DAEMON_BUS);
+ printf("Success to create murphy main context\n");
return ctx;
}
else
- mrp_log_error("Failed to create murphy main context.");
+ printf("Failed to create murphy main context.\n");
exit(1);
}
cfg = mrp_parse_cfgfile(ctx->config_file);
if (cfg != NULL) {
- mrp_log_info("Blacklisted plugins of any type: %s",
+ printf("Blacklisted plugins of any type: %s\n",
ctx->blacklist_plugins ? ctx->blacklist_plugins:"<none>");
- mrp_log_info("Blacklisted builtin plugins: %s",
+ printf("Blacklisted builtin plugins: %s\n",
ctx->blacklist_builtin ? ctx->blacklist_builtin:"<none>");
- mrp_log_info("Blacklisted dynamic plugins: %s",
+ printf("Blacklisted dynamic plugins: %s\n",
ctx->blacklist_dynamic ? ctx->blacklist_dynamic:"<none>");
- mrp_log_info("Whitelisted plugins of any type: %s",
+ printf("Whitelisted plugins of any type: %s\n",
ctx->whitelist_plugins ? ctx->whitelist_plugins:"<none>");
- mrp_log_info("Whitelisted builtin plugins: %s",
+ printf("Whitelisted builtin plugins: %s\n",
ctx->whitelist_builtin ? ctx->whitelist_builtin:"<none>");
- mrp_log_info("Whitelisted dynamic plugins: %s",
+ printf("Whitelisted dynamic plugins: %s\n",
ctx->whitelist_dynamic ? ctx->whitelist_dynamic:"<none>");
mrp_block_blacklisted_plugins(ctx);
if (!mrp_exec_cfgfile(ctx, cfg)) {
- mrp_log_error("Failed to execute configuration.");
+ printf("Failed to execute configuration.\n");
exit(1);
}
}
else {
- mrp_log_error("Failed to parse configuration file '%s'.",
+ printf("Failed to parse configuration file '%s'.\n",
ctx->config_file);
exit(1);
}
emit_daemon_event(ctx, DAEMON_EVENT_STARTING);
if (mrp_start_plugins(ctx))
- mrp_log_info("Successfully started all loaded plugins.");
+ printf("Successfully started all loaded plugins.\n");
else {
- mrp_log_error("Some plugins failed to start.");
+ printf("Some plugins failed to start.\n");
exit(1);
}
}
parse_cmdline(ctx, argc, argv, envp);
load_configuration(ctx);
start_plugins(ctx);
+ setup_logging(ctx);
load_ruleset(ctx);
prepare_ruleset(ctx);
- setup_logging(ctx);
set_linebuffered(stdout);
set_nonbuffered(stderr);
daemonize(ctx);