- Fixed wrong value of log_level when invoking fpm with -tt

This commit is contained in:
Jérôme Loyet 2011-07-05 18:09:07 +00:00
parent 987c843674
commit c4b7abb4ea
4 changed files with 11 additions and 4 deletions

1
NEWS
View File

@ -34,6 +34,7 @@ PHP NEWS
. Fixed missing Expires and Cache-Control headers for ping and status pages.
(fat)
. Fixed memory leak. (fat) Reported and fixed by Giovanni Giacobbi.
. Fixed wrong value of log_level when invoking fpm with -tt. (fat)
- SPL extension:
. Fixed bug #54971 (Wrong result when using iterator_to_array with use_keys

View File

@ -1151,7 +1151,7 @@ static void fpm_conf_dump() /* {{{ */
zlog(ZLOG_NOTICE, "\tpid = %s", STR2STR(fpm_global_config.pid_file));
zlog(ZLOG_NOTICE, "\tdaemonize = %s", BOOL2STR(fpm_global_config.daemonize));
zlog(ZLOG_NOTICE, "\terror_log = %s", STR2STR(fpm_global_config.error_log));
zlog(ZLOG_NOTICE, "\tlog_level = %s", zlog_get_level_name());
zlog(ZLOG_NOTICE, "\tlog_level = %s", zlog_get_level_name(fpm_globals.log_level));
zlog(ZLOG_NOTICE, "\tprocess_control_timeout = %ds", fpm_global_config.process_control_timeout);
zlog(ZLOG_NOTICE, "\temergency_restart_interval = %ds", fpm_global_config.emergency_restart_interval);
zlog(ZLOG_NOTICE, "\temergency_restart_threshold = %d", fpm_global_config.emergency_restart_threshold);

View File

@ -29,9 +29,15 @@ static const char *level_names[] = {
[ZLOG_ALERT] = "ALERT",
};
const char *zlog_get_level_name() /* {{{ */
const char *zlog_get_level_name(int log_level) /* {{{ */
{
return level_names[zlog_level];
if (log_level < 0) {
log_level = zlog_level;
} else if (log_level < ZLOG_DEBUG || log_level > ZLOG_ALERT) {
return "unknown value";
}
return level_names[log_level];
}
/* }}} */

View File

@ -11,7 +11,7 @@ struct timeval;
int zlog_set_fd(int new_fd);
int zlog_set_level(int new_value);
const char *zlog_get_level_name();
const char *zlog_get_level_name(int log_level);
void zlog_set_launched(void);
size_t zlog_print_time(struct timeval *tv, char *timebuf, size_t timebuf_len);