This function is used within para_server and para_audiod. Adding the
"para_" prefix in daemon_log_welcome() rather than its callers avoids
the duplication. Also rename the "whoami" parameter to "name" and add
documentation for it. Finally, the build date is not really important
in the log message, so simply remove it.
PARA_EMERG_LOG("%s\n", para_strerror(-ret));
exit(EXIT_FAILURE);
}
- daemon_log_welcome("para_audiod");
+ daemon_log_welcome("audiod");
daemon_set_start_time();
set_initial_status();
FOR_EACH_SLOT(i)
/**
* Log the startup message containing the paraslash version.
+ *
+ * \param name The name of the executable.
+ *
+ * First the given \a name is prefixed with the string "para_". Next the git
+ * version is appended. The resulting string is logged with priority "INFO".
*/
-void daemon_log_welcome(const char *whoami)
+void daemon_log_welcome(const char *name)
{
- PARA_INFO_LOG("welcome to %s " PACKAGE_VERSION " ("BUILD_DATE")\n",
- whoami);
+ PARA_INFO_LOG("welcome to para_%s-" PACKAGE_VERSION " \n", name);
}
/**
daemon_drop_privileges_or_die(conf.user_arg, conf.group_arg);
/* parse config file, open log and set defaults */
parse_config_or_die(0);
- daemon_log_welcome("para_server");
+ daemon_log_welcome("server");
init_ipc_or_die(); /* init mmd struct and mmd->lock */
daemon_set_start_time();
init_user_list(user_list_file);