Skip to content

Commit

Permalink
verify if the log file was opened
Browse files Browse the repository at this point in the history
  • Loading branch information
jpereira committed Nov 29, 2016
1 parent 705c99a commit 8640369
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ngx_backtrace_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,15 @@ ngx_backtrace_files(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
static ngx_int_t
ngx_backtrace_init_worker(ngx_cycle_t *cycle)
{
ngx_backtrace_conf_t *bcf;

bcf = (ngx_backtrace_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_backtrace_module);

if (!bcf->log) {
ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "ngx_backtrace_module: The module is not in use");
return NGX_OK;
}

if (ngx_init_error_signals(cycle->log) == NGX_ERROR) {
return NGX_ERROR;
}
Expand Down

0 comments on commit 8640369

Please sign in to comment.