diff --git a/helpers.h b/helpers.h index 0b4a8e26..e3e3e8f4 100644 --- a/helpers.h +++ b/helpers.h @@ -38,8 +38,9 @@ * /dev/console as well. Useful for critical errors and early debug. */ #define _l(prio, fmt, args...) do { if (_slup) warnx(fmt, ##args); logit(prio, fmt "\n", ##args); } while (0) -#define _m(prio, fmt, args...) do { _l(prio, "finit:%s:%s() - " fmt, __FILE__, __func__, ##args); } while (0) +#define _m(prio, fmt, args...) do { _l(prio, "%s() - " fmt, __func__, ##args); } while (0) #define _d(fmt, args...) do { if (debug) { _m(LOG_DEBUG, fmt, ##args); } } while (0) +#define _w(fmt, args...) do { _m(LOG_WARNING, fmt, ##args); } while (0) #define _e(fmt, args...) do { _m(LOG_ERR, fmt, ##args); } while (0) #define _pe(fmt, args...) do { _m(LOG_ERR, fmt ". Error %d: %s", ##args, errno, strerror(errno)); } while (0) diff --git a/service.c b/service.c index 9e982da4..2ec50b19 100755 --- a/service.c +++ b/service.c @@ -268,7 +268,7 @@ static int service_start(svc_t *svc) if (strlen(arg) < (sizeof(buf) - strlen(buf))) strcat(buf, arg); } - _e("Starting %s: %s", svc->cmd, buf); + _d("Starting %s: %s", svc->cmd, buf); } svc->pid = pid; @@ -548,7 +548,7 @@ int service_register(int type, char *line, time_t mtime, char *username) plugin = plugin_find(ps); if (!plugin || !plugin->inetd.cmd) { - _e("Inetd service %s has no internal plugin, skipping.", service); + _w("Inetd service %s has no internal plugin, skipping.", service); return errno = ENOENT; } }