Skip to content

Commit 2d79ec1

Browse files
author
Jérôme Loyet
committed
make error messages more consistent
1 parent 3cc15c1 commit 2d79ec1

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

sapi/fpm/fpm/fpm_children.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,9 @@ void fpm_children_bury() /* {{{ */
241241
timersub(&tv1, &child->started, &tv2);
242242

243243
if (restart_child) {
244+
if (!fpm_pctl_can_spawn_children()) {
245+
severity = ZLOG_DEBUG;
246+
}
244247
zlog(ZLOG_STUFF, severity, "[pool %s] child %d exited %s after %ld.%06d seconds from start", child->wp->config->name, (int) pid, buf, tv2.tv_sec, (int) tv2.tv_usec);
245248
} else {
246249
zlog(ZLOG_STUFF, ZLOG_DEBUG, "[pool %s] child %d has been killed by the process managment after %ld.%06d seconds from start", child->wp->config->name, (int) pid, tv2.tv_sec, (int) tv2.tv_usec);

sapi/fpm/fpm/fpm_process_ctl.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ static void fpm_pctl_kill_all(int signo) /* {{{ */
157157
for (child = wp->children; child; child = child->next) {
158158
int res = kill(child->pid, signo);
159159

160-
zlog(ZLOG_STUFF, ZLOG_NOTICE, "[pool %s] sending signal %d %s to child %d",
160+
zlog(ZLOG_STUFF, ZLOG_DEBUG, "[pool %s] sending signal %d %s to child %d",
161161
child->wp->config->name, signo,
162162
fpm_signal_names[signo] ? fpm_signal_names[signo] : "", (int) child->pid);
163163

@@ -168,7 +168,7 @@ static void fpm_pctl_kill_all(int signo) /* {{{ */
168168
}
169169

170170
if (alive_children) {
171-
zlog(ZLOG_STUFF, ZLOG_NOTICE, "%d child(ren) still alive", alive_children);
171+
zlog(ZLOG_STUFF, ZLOG_DEBUG, "%d child(ren) still alive", alive_children);
172172
}
173173
}
174174
/* }}} */
@@ -223,15 +223,15 @@ void fpm_pctl(int new_state, int action) /* {{{ */
223223
if (new_state == FPM_PCTL_STATE_TERMINATING) break;
224224
case FPM_PCTL_STATE_TERMINATING :
225225
/* nothing can override 'terminating' state */
226-
zlog(ZLOG_STUFF, ZLOG_NOTICE, "not switching to '%s' state, because already in '%s' state",
226+
zlog(ZLOG_STUFF, ZLOG_DEBUG, "not switching to '%s' state, because already in '%s' state",
227227
fpm_state_names[new_state], fpm_state_names[fpm_state]);
228228
return;
229229
}
230230

231231
fpm_signal_sent = 0;
232232
fpm_state = new_state;
233233

234-
zlog(ZLOG_STUFF, ZLOG_NOTICE, "switching to '%s' state", fpm_state_names[fpm_state]);
234+
zlog(ZLOG_STUFF, ZLOG_DEBUG, "switching to '%s' state", fpm_state_names[fpm_state]);
235235
/* fall down */
236236

237237
case FPM_PCTL_ACTION_TIMEOUT :

0 commit comments

Comments
 (0)