diff options
author | Ingela Anderton Andin <[email protected]> | 2015-12-01 10:04:58 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2015-12-01 10:04:58 +0100 |
commit | c3d8abd51baafd992bddba8988ebb901eba0d072 (patch) | |
tree | b1202c6e914b4a791931bb0ce4752d29dba5cabf /lib/inets/src/http_server/httpd_util.erl | |
parent | 49daa385517010dd03dc5de6b37265eb06d59c5a (diff) | |
parent | 552818fd16f1a842e5d206d43bb442de685356da (diff) | |
download | otp-c3d8abd51baafd992bddba8988ebb901eba0d072.tar.gz otp-c3d8abd51baafd992bddba8988ebb901eba0d072.tar.bz2 otp-c3d8abd51baafd992bddba8988ebb901eba0d072.zip |
Merge branch 'maint'
Diffstat (limited to 'lib/inets/src/http_server/httpd_util.erl')
-rw-r--r-- | lib/inets/src/http_server/httpd_util.erl | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/inets/src/http_server/httpd_util.erl b/lib/inets/src/http_server/httpd_util.erl index 0387d71911..ab43f0b378 100644 --- a/lib/inets/src/http_server/httpd_util.erl +++ b/lib/inets/src/http_server/httpd_util.erl @@ -31,7 +31,7 @@ convert_netscapecookie_date/1, enable_debug/1, valid_options/3, modules_validate/1, module_validate/1, dir_validate/2, file_validate/2, mime_type_validate/1, - mime_types_validate/1, custom_date/0]). + mime_types_validate/1, custom_date/0, error_log/2]). -export([encode_hex/1, decode_hex/1]). -include_lib("kernel/include/file.hrl"). @@ -776,3 +776,17 @@ do_enable_debug([{Level,Modules}|Rest]) ok end, do_enable_debug(Rest). + +error_log(ConfigDb, Error) -> + error_log(mod_log, ConfigDb, Error), + error_log(mod_disk_log, ConfigDb, Error). + +error_log(Mod, ConfigDB, Error) -> + Modules = httpd_util:lookup(ConfigDB, modules, + [mod_get, mod_head, mod_log]), + case lists:member(Mod, Modules) of + true -> + Mod:report_error(ConfigDB, Error); + _ -> + ok + end. |