Mercurial > hg > nginx
comparison src/event/modules/ngx_kqueue_module.c @ 6479:dc92298b1852
Events: fixed logging.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Thu, 31 Mar 2016 02:33:55 +0300 |
parents | 4652f8f26b12 |
children | a72886067bbb |
comparison
equal
deleted
inserted
replaced
6478:3ef7bb882ad4 | 6479:dc92298b1852 |
---|---|
577 ngx_kqueue_dump_event(cycle->log, &event_list[i]); | 577 ngx_kqueue_dump_event(cycle->log, &event_list[i]); |
578 | 578 |
579 if (event_list[i].flags & EV_ERROR) { | 579 if (event_list[i].flags & EV_ERROR) { |
580 ngx_log_error(NGX_LOG_ALERT, cycle->log, event_list[i].data, | 580 ngx_log_error(NGX_LOG_ALERT, cycle->log, event_list[i].data, |
581 "kevent() error on %d filter:%d flags:%04Xd", | 581 "kevent() error on %d filter:%d flags:%04Xd", |
582 event_list[i].ident, event_list[i].filter, | 582 (int) event_list[i].ident, event_list[i].filter, |
583 event_list[i].flags); | 583 event_list[i].flags); |
584 continue; | 584 continue; |
585 } | 585 } |
586 | 586 |
587 #if (NGX_HAVE_TIMER_EVENT) | 587 #if (NGX_HAVE_TIMER_EVENT) |
674 | 674 |
675 | 675 |
676 static ngx_inline void | 676 static ngx_inline void |
677 ngx_kqueue_dump_event(ngx_log_t *log, struct kevent *kev) | 677 ngx_kqueue_dump_event(ngx_log_t *log, struct kevent *kev) |
678 { | 678 { |
679 ngx_log_debug6(NGX_LOG_DEBUG_EVENT, log, 0, | 679 if (kev->ident > 0x8000000 && kev->ident != (unsigned) -1) { |
680 (kev->ident > 0x8000000 && kev->ident != (unsigned) -1) ? | 680 ngx_log_debug6(NGX_LOG_DEBUG_EVENT, log, 0, |
681 "kevent: %p: ft:%d fl:%04Xd ff:%08Xd d:%d ud:%p": | 681 "kevent: %p: ft:%d fl:%04Xd ff:%08Xd d:%d ud:%p", |
682 "kevent: %d: ft:%d fl:%04Xd ff:%08Xd d:%d ud:%p", | 682 (void *) kev->ident, kev->filter, |
683 kev->ident, kev->filter, | 683 kev->flags, kev->fflags, |
684 kev->flags, kev->fflags, | 684 (int) kev->data, kev->udata); |
685 kev->data, kev->udata); | 685 |
686 } else { | |
687 ngx_log_debug6(NGX_LOG_DEBUG_EVENT, log, 0, | |
688 "kevent: %d: ft:%d fl:%04Xd ff:%08Xd d:%d ud:%p", | |
689 (int) kev->ident, kev->filter, | |
690 kev->flags, kev->fflags, | |
691 (int) kev->data, kev->udata); | |
692 } | |
686 } | 693 } |
687 | 694 |
688 | 695 |
689 static void * | 696 static void * |
690 ngx_kqueue_create_conf(ngx_cycle_t *cycle) | 697 ngx_kqueue_create_conf(ngx_cycle_t *cycle) |