summaryrefslogtreecommitdiffhomepage
path: root/src/core/ngx_log.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2020-11-19Core: "-e" command line option.Igor Ippolitov1-11/+8
When installing or running from a non-root user it is sometimes required to override default, compiled in error log path. There was no way to do this without rebuilding the binary (ticket #147). This patch introduced "-e" command line option which allows one to override compiled in error log path.
2016-03-31Removed the prototype mysql module.Ruslan Ermilov1-1/+1
2016-03-30Style.Ruslan Ermilov1-10/+10
2015-05-19Core: properly initialized written bytes counter in memory log.Valentin Bartenev1-1/+1
2015-04-20Stream: port from NGINX+.Ruslan Ermilov1-1/+1
2015-03-19Core: added cyclic memory buffer support for error_log.Valentin Bartenev1-0/+120
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
2015-03-04Log: use ngx_cpymem() in a couple of places, no functional changes.Valentin Bartenev1-6/+3
2015-01-13Core: added disk_full_time checks to error log.Maxim Dounin1-4/+21
2014-07-24Core: fixed default log initialization.Vladimir Homutov1-4/+6
The ngx_log_insert() function may invalidate pointer passed to it, so make sure to don't use it after the ngx_log_insert() call.
2014-05-12Added syslog support for error_log and access_log directives.Vladimir Homutov1-14/+72
2013-06-28Core: consolidated log-related code.Vladimir Homutov1-0/+42
The stderr redirection code is moved to ngx_log_redirect_stderr(). The opening of the default log code is moved to ngx_log_open_default().
2013-06-20Core: support several "error_log" directives.Vladimir Homutov1-38/+99
When several "error_log" directives are specified in the same configuration block, logs are written to all files with a matching log level. All logs are stored in the singly-linked list that is sorted by log level in the descending order. Specific debug levels (NGX_LOG_DEBUG_HTTP,EVENT, etc.) are not supported if several "error_log" directives are specified. In this case all logs will use debug level that has largest absolute value.
2013-06-13Core: moved initialization of log level.Vladimir Homutov1-2/+0
The cycle->new_log->log_level should only be initialized by ngx_init_cycle() if no error logs were found in the configuration. This move allows to get rid of extra initialization in ngx_error_log().
2013-06-04Core: fixed handling of "stderr" in error_log.Vladimir Homutov1-0/+1
If "stderr" was specified in one of the "error_log" directives, stderr is not redirected to the first error_log on startup, configuration reload, and reopening log files.
2012-01-18Copyright updated.Maxim Konovalov1-0/+1
2011-08-18Complain on invalid log levels.Maxim Dounin1-3/+7
Previously only first log level was required to be correct, while error_log directive in fact accepts list of levels (e.g. one may specify "error_log ... debug_core debug_http;"). This resulted in (avoidable) wierd behaviour on missing semicolon after error_log directive, e.g. error_log /path/to/log info index index.php; silently skipped index directive and it's arguments (trying to interpret them as log levels without checking to be correct).
2011-02-21remove semicolon, because it is already in "nginx: " prefixIgor Sysoev1-1/+1
2010-12-11remove semicolon, because it is already in "nginx: " prefixIgor Sysoev1-2/+2
2010-11-29add "nginx: " prefix when logging to the stderrIgor Sysoev1-3/+6
2010-11-25use copied strerror() messages and autoconfigured sys_nerr valueIgor Sysoev1-1/+1
2010-05-14ngx_str_set() and ngx_str_null()Igor Sysoev1-2/+1
2009-04-30*) refactor error_log processing: listen socket log might inherit built-inIgor Sysoev1-22/+28
error_log with zero level, and r2447, r2466, r2467 were not enough *) remove bogus "stderr" level *) some functions and fields renames
2009-04-29fix building by BCC if NGX_PREFIX is definedIgor Sysoev1-2/+3
2009-04-28introduce ngx_write_console() to support OEM code pagesIgor Sysoev1-2/+2
2009-04-27ngx_log_errno()Igor Sysoev1-42/+28
2009-04-27use ngx_vslprintf(), ngx_slprintf()Igor Sysoev1-14/+14
2009-04-27-p and --prefix=Igor Sysoev1-9/+55
2009-04-24change ngx_log_abort() interfaceIgor Sysoev1-3/+12
2009-04-24style fix: (void)Igor Sysoev1-2/+2
2009-04-24change ngx_log_create_errlog() interfaceIgor Sysoev1-10/+1
2009-04-23issue start up errors and warning on both stderr and error_logIgor Sysoev1-24/+70
2009-04-23style fix: remove trailing spaces introduced in the previous commitIgor Sysoev1-2/+2
2009-04-23use ngx_str_t for error levelsIgor Sysoev1-10/+17
2009-04-21style fix: remove trailing spacesIgor Sysoev1-1/+1
2009-04-21fix r2731 for Win32Igor Sysoev1-2/+8
2009-04-20Win32 master/workers modelIgor Sysoev1-3/+3
2009-04-19show -t results on stderrIgor Sysoev1-0/+21
2009-04-17fix building on platforms which have no atomic operations support,Igor Sysoev1-2/+2
the bug was introduced in r2564
2009-03-31Win32 appends synchronized if only FILE_APPEND_DATA and SYNCHRONIZE are setIgor Sysoev1-1/+1
without any other flags. On the other hand, Unix requires at least the write flag to be set together with O_APPEND.
2009-03-30win32 ngx_open_file() supports utf8 names and NGX_FILE_APPENDIgor Sysoev1-10/+4
2009-02-24small optimization: " == NGX_ERROR" > " != NGX_OK"Igor Sysoev1-1/+1
2009-01-16set the error level as default http error_log levelIgor Sysoev1-1/+4
2008-12-09compact win32 errno loggingIgor Sysoev1-10/+2
2008-11-11compatibility with glibc 2.3, warn_unused_result attribute for write()Igor Sysoev1-1/+1
2007-07-29--sysconfdir=DIRIgor Sysoev1-1/+1
2007-03-19Many changes:Igor Sysoev1-1/+1
*) rename imap to mail, sort pop3/imap functions *) smtp auth support *) pop3 starttls only *) fix segfault if cram-md5 was used without apop
2007-01-18ngx_open_file(name, access, create) > ngx_open_file(name, mode, create, access)Igor Sysoev1-1/+1
2007-01-18fix log messageIgor Sysoev1-1/+1
2006-12-19ngx_sprintf() has implicit limit of 65536 bytes so on Linux/ppc64Igor Sysoev1-3/+4
in 32-bit mode the errstr is somewhere at 0xffffd680, the "last" overflows and ngx_vsnprintf() does not print at all
2006-11-20slab allocator in shared memoryIgor Sysoev1-0/+7