Henri Gomez wrote: > > > > Well, I can extract the apache's logging functions in file > that will > > use stdout/stderr, so we'll have the same api. > > The file will get complied together with test case, so > there will be > > no need to change something in the core of lib, and we > willl not need > > anything pluggable :). > > The only difference would be: > > > > #ifdef AJP_TEST_CASE > > #include "httpd_wrapper.h" > > #else > > ... Include the real apache headers > > #endif > > > > Think that other needed ap_xxx api calls can be written in the same > > way, finaly having something like 'dummy apache2 API lib' > for testing > > from command line. > > If we need a request_rec struct for example, we'll make our own > > surrogate and fill it only with the needed struct elements, etc... > > I could start with assumption we have ajp_log(xxxx) function > in the lib like this ? > > ajp_log(ajp_env_t * env, int loglevel, char * fmt, ...) ? >
No, use the exactly the same API as Apache2 logging.
ap_log_error(APLOG_MARK, APLOG_INFO, rv, server,
"whatever message");
I'll rewrite the logging using simple fprintf to stdio/stderr, preserving
actual API, so we don't need the wrapers.
And, since we don't have a server_rec stucture I'll make a dummy one in
httpd_wrapper.h
Think it would ease a lot.
I'll have something later today (httpd_wrapper.h and httpd_wrapper.c)
offering a apache2 API to console apps, mimicking libhttpd (only what's
needed).
You can work in the meantime on build infrastructure.
I prefer not having a actual lib produced, cause it will have to fit in one
or two files. We can for start make couple of them, and later merge them
into a single file, that will accompany the proxy_ajp.c.
MT.
smime.p7s
Description: S/MIME cryptographic signature
