#include <errno.h>
#include <syslog.h>
+#include <libgen.h>
#include <guacamole/client.h>
#include <guacamole/error.h>
}
}
+ /* Set up logging prefix */
+ strncpy(log_prefix, basename(argv[0]), sizeof(log_prefix));
+
+
/* Get addresses for binding */
if ((retval = getaddrinfo(listen_address, listen_port, &hints, &addresses))) {
guacd_log_error("Error parsing given address or port: %s",
current_address->ai_addr,
current_address->ai_addrlen) == 0) {
- guacd_log_error("Successfully bound socket to "
+ guacd_log_info("Successfully bound socket to "
"host %s, port %s", bound_address, bound_port);
/* Done if successful bind */
}
- /* Otherwise log error */
+ /* Otherwise log information regarding bind failure */
else
- guacd_log_error("Error binding socket to "
+ guacd_log_info("Unable to bind socket to "
"host %s, port %s: %s",
bound_address, bound_port, strerror(errno));
/* Ignore SIGPIPE */
if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) {
- guacd_log_error("Could not set handler for SIGPIPE to ignore. SIGPIPE may cause termination of the daemon.");
+ guacd_log_info("Could not set handler for SIGPIPE to ignore. SIGPIPE may cause termination of the daemon.");
}
/* Ignore SIGCHLD (force automatic removal of children) */
if (signal(SIGCHLD, SIG_IGN) == SIG_ERR) {
- guacd_log_error("Could not set handler for SIGCHLD to ignore. Child processes may pile up in the process table.");
+ guacd_log_info("Could not set handler for SIGCHLD to ignore. Child processes may pile up in the process table.");
}
/* Log listening status */