Add NO_STDERR flag.
This commit is contained in:
10
logging.c
10
logging.c
@@ -395,10 +395,12 @@ log_error(va_alist)
|
|||||||
/*
|
/*
|
||||||
* Tell the user.
|
* Tell the user.
|
||||||
*/
|
*/
|
||||||
if (flags & USE_ERRNO)
|
if (!ISSET(flags, NO_STDERR)) {
|
||||||
warn("%s", message);
|
if (flags & USE_ERRNO)
|
||||||
else
|
warn("%s", message);
|
||||||
warnx("%s", message);
|
else
|
||||||
|
warnx("%s", message);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Send a copy of the error via mail.
|
* Send a copy of the error via mail.
|
||||||
|
@@ -34,6 +34,7 @@
|
|||||||
#define USE_ERRNO 0x02
|
#define USE_ERRNO 0x02
|
||||||
#define NO_MAIL 0x04
|
#define NO_MAIL 0x04
|
||||||
#define NO_EXIT 0x08
|
#define NO_EXIT 0x08
|
||||||
|
#define NO_STDERR 0x10
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Maximum number of characters to log per entry. The syslogger
|
* Maximum number of characters to log per entry. The syslogger
|
||||||
|
Reference in New Issue
Block a user