comparison src/core/nginx.c @ 4283:f72496073689

Introduction of simple ngx_write_stderr() instead of ngx_log_stderr() for output of ./configure options, etc., since ngx_log_stderr() output length is limited by 2048 characters defined as NGX_MAX_ERROR_STR.
author Igor Sysoev <igor@sysoev.ru>
date Mon, 14 Nov 2011 14:59:00 +0000
parents 1b779cb69dc8
children 3bae3d8fb573
comparison
equal deleted inserted replaced
4282:71cdac0b9ea6 4283:f72496073689
212 if (ngx_get_options(argc, argv) != NGX_OK) { 212 if (ngx_get_options(argc, argv) != NGX_OK) {
213 return 1; 213 return 1;
214 } 214 }
215 215
216 if (ngx_show_version) { 216 if (ngx_show_version) {
217 ngx_log_stderr(0, "nginx version: " NGINX_VER); 217 ngx_write_stderr("nginx version: " NGINX_VER NGX_LINEFEED);
218 218
219 if (ngx_show_help) { 219 if (ngx_show_help) {
220 ngx_log_stderr(0, 220 ngx_write_stderr(
221 "Usage: nginx [-?hvVtq] [-s signal] [-c filename] " 221 "Usage: nginx [-?hvVtq] [-s signal] [-c filename] "
222 "[-p prefix] [-g directives]" CRLF CRLF 222 "[-p prefix] [-g directives]" NGX_LINEFEED
223 "Options:" CRLF 223 NGX_LINEFEED
224 " -?,-h : this help" CRLF 224 "Options:" NGX_LINEFEED
225 " -v : show version and exit" CRLF 225 " -?,-h : this help" NGX_LINEFEED
226 " -v : show version and exit" NGX_LINEFEED
226 " -V : show version and configure options then exit" 227 " -V : show version and configure options then exit"
227 CRLF 228 NGX_LINEFEED
228 " -t : test configuration and exit" CRLF 229 " -t : test configuration and exit" NGX_LINEFEED
229 " -q : suppress non-error messages " 230 " -q : suppress non-error messages "
230 "during configuration testing" CRLF 231 "during configuration testing" NGX_LINEFEED
231 " -s signal : send signal to a master process: " 232 " -s signal : send signal to a master process: "
232 "stop, quit, reopen, reload" CRLF 233 "stop, quit, reopen, reload" NGX_LINEFEED
233 #ifdef NGX_PREFIX 234 #ifdef NGX_PREFIX
234 " -p prefix : set prefix path (default: " 235 " -p prefix : set prefix path (default: "
235 NGX_PREFIX ")" CRLF 236 NGX_PREFIX ")" NGX_LINEFEED
236 #else 237 #else
237 " -p prefix : set prefix path (default: NONE)" CRLF 238 " -p prefix : set prefix path (default: NONE)" NGX_LINEFEED
238 #endif 239 #endif
239 " -c filename : set configuration file (default: " 240 " -c filename : set configuration file (default: "
240 NGX_CONF_PATH ")" CRLF 241 NGX_CONF_PATH ")" NGX_LINEFEED
241 " -g directives : set global directives out of configuration " 242 " -g directives : set global directives out of configuration "
242 "file" CRLF 243 "file" NGX_LINEFEED NGX_LINEFEED
243 ); 244 );
244 } 245 }
245 246
246 if (ngx_show_configure) { 247 if (ngx_show_configure) {
248 ngx_write_stderr(
247 #ifdef NGX_COMPILER 249 #ifdef NGX_COMPILER
248 ngx_log_stderr(0, "built by " NGX_COMPILER); 250 "built by " NGX_COMPILER NGX_LINEFEED
249 #endif 251 #endif
250 #if (NGX_SSL) 252 #if (NGX_SSL)
251 #ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME 253 #ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
252 ngx_log_stderr(0, "TLS SNI support enabled"); 254 "TLS SNI support enabled" NGX_LINEFEED
253 #else 255 #else
254 ngx_log_stderr(0, "TLS SNI support disabled"); 256 "TLS SNI support disabled" NGX_LINEFEED
255 #endif 257 #endif
256 #endif 258 #endif
257 ngx_log_stderr(0, "configure arguments:" NGX_CONFIGURE); 259 "configure arguments:" NGX_CONFIGURE NGX_LINEFEED);
258 } 260 }
259 261
260 if (!ngx_test_config) { 262 if (!ngx_test_config) {
261 return 0; 263 return 0;
262 } 264 }