view src/misc/ngx_cpp_test_module.cpp @ 6033:8e66a83d16ae

Core: added cyclic memory buffer support for error_log. Example of usage: error_log memory:16m debug; This allows to configure debug logging with minimum impact on performance. It's especially useful when rare crashes are experienced under high load. The log can be extracted from a coredump using the following gdb script: set $log = ngx_cycle->log while $log->writer != ngx_log_memory_writer set $log = $log->next end set $buf = (ngx_log_memory_buf_t *) $log->wdata dump binary memory debug_log.txt $buf->start $buf->end
author Valentin Bartenev <vbart@nginx.com>
date Thu, 19 Mar 2015 19:29:43 +0300
parents 1d693deab8ae
children f1e6f65ddfeb
line wrap: on
line source


// stub module to test header files' C++ compatibility

extern "C" {
  #include <ngx_config.h>
  #include <ngx_core.h>
  #include <ngx_event.h>
  #include <ngx_event_connect.h>
  #include <ngx_event_pipe.h>

  #include <ngx_http.h>

  #include <ngx_mail.h>
  #include <ngx_mail_pop3_module.h>
  #include <ngx_mail_imap_module.h>
  #include <ngx_mail_smtp_module.h>
}

// nginx header files should go before other, because they define 64-bit off_t
// #include <string>


void ngx_cpp_test_handler(void *data);

void
ngx_cpp_test_handler(void *data)
{
    return;
}