title: Nginx which logging object to use - ngx_cycle->log vs event->log?
body: <p>I am trying to understand which logging object should be used in Nginx modules. For e.g. in <a href="https://github.com/alibaba/tengine/blob/master/modules/ngx_http_upstream_check_module/ngx_http_upstream_check_module.c#L1775-L1798" rel="nofollow noreferrer">this same method</a>, at some places I see <code>ngx_cycle-&gt;log</code>, at other places <code>event-&gt;log</code> or <code>c-&gt;log</code>. What is the right way to choose this?</p>
  
  <p>With all of them the logs do show up in the log file though.</p>
  
  <p>As you can see <a href="https://github.com/nginx/nginx/blob/4bf4650f2f10f7bbacfe7a33da744f18951d416d/src/core/ngx_log.h" rel="nofollow noreferrer">here</a> this is the second argument to function <code>ngx_log_error_core</code> and its type is <code>ngx_log_t*</code>.</p>
  
  <p>I read about the <a href="https://nginx.org/en/docs/dev/development_guide.html#cycle" rel="nofollow noreferrer">cycle</a> but it's still not clear.</p>