summaryrefslogtreecommitdiff
path: root/src/libtipidee/tipidee_log_resource.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libtipidee/tipidee_log_resource.c')
-rw-r--r--src/libtipidee/tipidee_log_resource.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/libtipidee/tipidee_log_resource.c b/src/libtipidee/tipidee_log_resource.c
index dc525a5..6387027 100644
--- a/src/libtipidee/tipidee_log_resource.c
+++ b/src/libtipidee/tipidee_log_resource.c
@@ -4,8 +4,21 @@
#include <tipidee/log.h>
-void tipidee_log_resource (uint32_t v, char const *docroot, char const *file, tipidee_resattr const *ra)
+void tipidee_log_resource (uint32_t v, tipidee_rql const *rql, char const *docroot, char const *file, tipidee_resattr const *ra)
{
+ char const *a[8] = { PROG, ": info:" } ;
+ size_t m = 2 ;
if (!(v & TIPIDEE_LOG_RESOURCE)) return ;
- strerr_warni6x("docroot ", docroot, " file ", file, " type ", ra->iscgi ? ra->isnph ? "nph" : "cgi" : ra->content_type) ;
+ if (v & TIPIDEE_LOG_HOSTASPREFIX)
+ {
+ a[m++] = " host " ;
+ a[m++] = rql->uri.host ;
+ }
+ a[m++] = " docroot " ;
+ a[m++] = docroot ;
+ a[m++] = " file " ;
+ a[m++] = file ;
+ a[m++] = " type " ;
+ a[m++] = ra->iscgi ? ra->isnph ? "nph" : "cgi" : ra->content_type ;
+ strerr_warnv(a, m) ;
}