MINOR: log: do not discard stderr when starting is over
Always print message in ha_alert/warning/notice when starting is over,
regardless of quiet/verbose options.
This change is useful to retrieve the output via the newly implemented
user messages buffer at runtime, for the CLI handlers.
diff --git a/src/errors.c b/src/errors.c
index b2ff429..9da04f9 100644
--- a/src/errors.c
+++ b/src/errors.c
@@ -129,8 +129,9 @@
{
va_list argp;
- if (!(global.mode & MODE_QUIET) || (global.mode & (MODE_VERBOSE | MODE_STARTING))) {
- if (!(warned & WARN_EXEC_PATH)) {
+ if (!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE) ||
+ !(global.mode & MODE_STARTING)) {
+ if (!(warned & WARN_EXEC_PATH) && (global.mode & MODE_STARTING)) {
const char *path = get_exec_path();
warned |= WARN_EXEC_PATH;
@@ -153,7 +154,8 @@
warned |= WARN_ANY;
- if (!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE)) {
+ if (!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE) ||
+ !(global.mode & MODE_STARTING)) {
va_start(argp, fmt);
print_message("WARNING", fmt, argp);
va_end(argp);
@@ -203,7 +205,8 @@
{
va_list argp;
- if (!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE)) {
+ if (!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE) ||
+ !(global.mode & MODE_STARTING)) {
va_start(argp, fmt);
print_message("NOTICE", fmt, argp);
va_end(argp);