}
if (ngx_fd_info(fd, &fi) == NGX_FILE_ERROR) {
- ngx_log_error(NGX_LOG_EMERG, cf->log, ngx_errno,
- ngx_fd_info_n " \"%s\" failed", file.data);
+ ngx_conf_log_error(NGX_LOG_EMERG, cf, ngx_errno,
+ ngx_fd_info_n " \"%s\" failed", file.data);
(void) ngx_close_file(fd);
return NGX_CONF_ERROR;
}
n = ngx_read_fd(fd, start, size);
if (n == -1) {
- ngx_log_error(NGX_LOG_ALERT, cf->log, ngx_errno,
- ngx_read_fd_n " \"%s\" failed", file.data);
+ ngx_conf_log_error(NGX_LOG_EMERG, cf, ngx_errno,
+ ngx_read_fd_n " \"%s\" failed", file.data);
(void) ngx_close_file(fd);
return NGX_CONF_ERROR;
}
if ((size_t) n != size) {
- ngx_log_error(NGX_LOG_ALERT, cf->log, 0,
- ngx_read_fd_n " has read only %z of %O from \"%s\"",
- n, size, file.data);
+ ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
+ ngx_read_fd_n " has read only %z of %O from \"%s\"",
+ n, size, file.data);
(void) ngx_close_file(fd);
return NGX_CONF_ERROR;
}
if (ngx_close_file(fd) == NGX_FILE_ERROR) {
- ngx_log_error(NGX_LOG_ALERT, cf->log, ngx_errno,
- ngx_close_file_n " %s failed", file.data);
+ ngx_conf_log_error(NGX_LOG_EMERG, cf, ngx_errno,
+ ngx_close_file_n " %s failed", file.data);
}
end = start + size;
}
if (ngx_fd_info(fd, &fi) == NGX_FILE_ERROR) {
- ngx_log_error(NGX_LOG_EMERG, cf->log, ngx_errno,
- ngx_fd_info_n " \"%s\" failed", file.data);
+ ngx_conf_log_error(NGX_LOG_EMERG, cf, ngx_errno,
+ ngx_fd_info_n " \"%s\" failed", file.data);
(void) ngx_close_file(fd);
return NGX_CONF_ERROR;
}
n = ngx_read_fd(fd, start, size);
if (n == -1) {
- ngx_log_error(NGX_LOG_ALERT, cf->log, ngx_errno,
- ngx_read_fd_n " \"%s\" failed", file.data);
+ ngx_conf_log_error(NGX_LOG_EMERG, cf, ngx_errno,
+ ngx_read_fd_n " \"%s\" failed", file.data);
(void) ngx_close_file(fd);
return NGX_CONF_ERROR;
}
if ((size_t) n != size) {
- ngx_log_error(NGX_LOG_ALERT, cf->log, 0,
- ngx_read_fd_n " has read only %z of %uz from \"%s\"",
- n, size, file.data);
+ ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
+ ngx_read_fd_n " has read only %z of %uz from \"%s\"",
+ n, size, file.data);
(void) ngx_close_file(fd);
return NGX_CONF_ERROR;
}
if (ngx_close_file(fd) == NGX_FILE_ERROR) {
- ngx_log_error(NGX_LOG_ALERT, cf->log, ngx_errno,
- ngx_close_file_n " %s failed", file.data);
+ ngx_conf_log_error(NGX_LOG_EMERG, cf, ngx_errno,
+ ngx_close_file_n " %s failed", file.data);
}
end = start + size;