diff options
author | Stefan Fritsch <sf@apache.org> | 2011-12-05 00:08:01 +0000 |
---|---|---|
committer | Stefan Fritsch <sf@apache.org> | 2011-12-05 00:08:01 +0000 |
commit | b6ae8ca44adfc5fdf7ec83d8a4fc29ea5d257a55 (patch) | |
tree | b544d4e790563bccd8b206df63ee562433114242 /modules/lua | |
parent | 2e8b47502c00a1b6ab0f71ae3d9081e18322f6fe (diff) | |
download | httpd-b6ae8ca44adfc5fdf7ec83d8a4fc29ea5d257a55.tar.gz |
Backport r1209766, r1210252, r1210284:
Add lots of unique tags to error log messages
ssl_util.c: Downgrade some dynamic locking messages from level DEBUG
to TRACE1-3
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1210287 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/lua')
-rw-r--r-- | modules/lua/lua_config.c | 2 | ||||
-rw-r--r-- | modules/lua/lua_request.c | 16 | ||||
-rw-r--r-- | modules/lua/lua_vmprep.c | 8 | ||||
-rw-r--r-- | modules/lua/mod_lua.c | 16 |
4 files changed, 21 insertions, 21 deletions
diff --git a/modules/lua/lua_config.c b/modules/lua/lua_config.c index 84356d71fd..0e675652e3 100644 --- a/modules/lua/lua_config.c +++ b/modules/lua/lua_config.c @@ -158,7 +158,7 @@ static const struct luaL_Reg cfg_methods[] = { static int cmd_foo(lua_State *L) { cmd_parms *cmd = check_cmd_parms(L, 1); - ap_log_error(APLOG_MARK, APLOG_ERR, 0, cmd->server, "FOO!"); + ap_log_error(APLOG_MARK, APLOG_ERR, 0, cmd->server, APLOGNO(01479) "FOO!"); return 0; } diff --git a/modules/lua/lua_request.c b/modules/lua/lua_request.c index 5d7d8f537e..cce3a9ce4f 100644 --- a/modules/lua/lua_request.c +++ b/modules/lua/lua_request.c @@ -30,7 +30,7 @@ void ap_lua_rstack_dump(lua_State *L, request_rec *r, const char *msg) int i; int top = lua_gettop(L); - ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, "Lua Stack Dump: [%s]", msg); + ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(01484) "Lua Stack Dump: [%s]", msg); for (i = 1; i <= top; i++) { int t = lua_type(L, i); @@ -194,7 +194,7 @@ static int req_add_output_filter(lua_State *L) { request_rec *r = ap_lua_check_request_rec(L, 1); const char *name = luaL_checkstring(L, 2); - ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "adding output filter %s", + ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01485) "adding output filter %s", name); ap_add_output_filter(name, L, r, r->connection); return 0; @@ -383,7 +383,7 @@ static int req_dispatch(lua_State *L) case APL_REQ_FUNTYPE_TABLE:{ apr_table_t *rs; req_field_apr_table_f func = (req_field_apr_table_f)rft->fun; - ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01486) "request_rec->dispatching %s -> apr table", name); rs = (*func)(r); @@ -393,7 +393,7 @@ static int req_dispatch(lua_State *L) case APL_REQ_FUNTYPE_LUACFUN:{ lua_CFunction func = (lua_CFunction)rft->fun; - ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01487) "request_rec->dispatching %s -> lua_CFunction", name); lua_pushcfunction(L, func); @@ -402,7 +402,7 @@ static int req_dispatch(lua_State *L) case APL_REQ_FUNTYPE_STRING:{ req_field_string_f func = (req_field_string_f)rft->fun; char *rs; - ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01488) "request_rec->dispatching %s -> string", name); rs = (*func) (r); lua_pushstring(L, rs); @@ -411,7 +411,7 @@ static int req_dispatch(lua_State *L) case APL_REQ_FUNTYPE_INT:{ req_field_int_f func = (req_field_int_f)rft->fun; int rs; - ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01489) "request_rec->dispatching %s -> int", name); rs = (*func) (r); lua_pushnumber(L, rs); @@ -420,7 +420,7 @@ static int req_dispatch(lua_State *L) case APL_REQ_FUNTYPE_BOOLEAN:{ req_field_int_f func = (req_field_int_f)rft->fun; int rs; - ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01490) "request_rec->dispatching %s -> boolean", name); rs = (*func) (r); lua_pushboolean(L, rs); @@ -429,7 +429,7 @@ static int req_dispatch(lua_State *L) } } - ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "nothing for %s", name); + ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01491) "nothing for %s", name); return 0; } diff --git a/modules/lua/lua_vmprep.c b/modules/lua/lua_vmprep.c index b2836e3424..308ffe6047 100644 --- a/modules/lua/lua_vmprep.c +++ b/modules/lua/lua_vmprep.c @@ -308,7 +308,7 @@ static int loadjitmodule(lua_State *L, apr_pool_t *lifecycle_pool) { lua_concat(L, 2); if (lua_pcall(L, 1, 1, 0)) { const char *msg = lua_tostring(L, -1); - ap_log_perror(APLOG_MARK, APLOG_DEBUG, 0, lifecycle_pool, + ap_log_perror(APLOG_MARK, APLOG_DEBUG, 0, lifecycle_pool, APLOGNO(01480) "Failed to init LuaJIT: %s", msg); return 1; } @@ -353,7 +353,7 @@ static apr_status_t vm_construct(void **vm, void *params, apr_pool_t *lifecycle_ } else { int rc; - ap_log_perror(APLOG_MARK, APLOG_DEBUG, 0, lifecycle_pool, + ap_log_perror(APLOG_MARK, APLOG_DEBUG, 0, lifecycle_pool, APLOGNO(01481) "loading lua file %s", spec->file); rc = luaL_loadfile(L, spec->file); if (rc != 0) { @@ -372,7 +372,7 @@ static apr_status_t vm_construct(void **vm, void *params, apr_pool_t *lifecycle_ err = "unknown error"; break; } - ap_log_perror(APLOG_MARK, APLOG_ERR, 0, lifecycle_pool, + ap_log_perror(APLOG_MARK, APLOG_ERR, 0, lifecycle_pool, APLOGNO(01482) "Loading lua file %s: %s", spec->file, err); return APR_EBADF; @@ -403,7 +403,7 @@ AP_LUA_DECLARE(lua_State*)ap_lua_get_lua_state(apr_pool_t *lifecycle_pool, lifecycle_pool) == APR_SUCCESS) { if(L==NULL) { - ap_log_perror(APLOG_MARK, APLOG_DEBUG, 0, lifecycle_pool, + ap_log_perror(APLOG_MARK, APLOG_DEBUG, 0, lifecycle_pool, APLOGNO(01483) "creating lua_State with file %s", spec->file); /* not available, so create */ diff --git a/modules/lua/mod_lua.c b/modules/lua/mod_lua.c index 53dbdab1b6..de4aceeb40 100644 --- a/modules/lua/mod_lua.c +++ b/modules/lua/mod_lua.c @@ -60,7 +60,7 @@ static void report_lua_error(lua_State *L, request_rec *r) ap_rputs(lua_response, r); ap_rputs("</p>\n", r); - ap_log_perror(APLOG_MARK, APLOG_WARNING, 0, r->pool, "Lua error: %s", + ap_log_perror(APLOG_MARK, APLOG_WARNING, 0, r->pool, APLOGNO(01471) "Lua error: %s", lua_response); } @@ -90,7 +90,7 @@ static int lua_handler(request_rec *r) return DECLINED; } - ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "handling [%s] in mod_lua", + ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01472) "handling [%s] in mod_lua", r->filename); dcfg = ap_get_module_config(r->per_dir_config, &lua_module); @@ -109,7 +109,7 @@ static int lua_handler(request_rec *r) spec->cb = &lua_open_callback; spec->cb_arg = NULL; - ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01473) "request details scope:%u, filename:%s, function:%s", spec->scope, spec->file, @@ -142,10 +142,10 @@ static int lua_handler(request_rec *r) ap_rputs("Unable to compile VM, see logs", r); return HTTP_INTERNAL_SERVER_ERROR; } - ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "got a vm!"); + ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01474) "got a vm!"); lua_getglobal(L, "handle"); if (!lua_isfunction(L, -1)) { - ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r, APLOGNO(01475) "lua: Unable to find function %s in %s", "handle", spec->file); @@ -203,7 +203,7 @@ static int lua_request_rec_hook_harness(request_rec *r, const char *name, int ap apr_filepath_merge(&spec->file, server_cfg->root_path, spec->file, APR_FILEPATH_NOTRELATIVE, r->pool); - ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01476) "request details scope:%u, filename:%s, function:%s", spec->scope, spec->file, @@ -230,7 +230,7 @@ static int lua_request_rec_hook_harness(request_rec *r, const char *name, int ap L = ap_lua_get_lua_state(pool, spec); if (!L) { - ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r, APLOGNO(01477) "lua: Failed to obtain lua interpreter for %s %s", hook_spec->function_name, hook_spec->file_name); return HTTP_INTERNAL_SERVER_ERROR; @@ -239,7 +239,7 @@ static int lua_request_rec_hook_harness(request_rec *r, const char *name, int ap if (hook_spec->function_name != NULL) { lua_getglobal(L, hook_spec->function_name); if (!lua_isfunction(L, -1)) { - ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r, APLOGNO(01478) "lua: Unable to find function %s in %s", hook_spec->function_name, hook_spec->file_name); |