Add a logging API so that an application can configure log level/components
and output stream at runtime.

* context.c
  (serf_context_create_ex): Cache a config object in the context.

* logging.c
  (log_baton_t): Add output_list variable.
  (log_to_output_t): New callback declaration.
  (serf_log_output_t): New struct declaration.
  (serf__log_init): Initialize the output_list, add some test code to setup
       logging to stderr.
  (serf__log_nopref,
   serf__log): Log the message to each of the definded output modules.
  (log_to_stream_output): New function, logs to a FILE stream.
  (serf_logging_create_stream_output): Create a output module for a standard
       stream type (stdout, stderr).
  (serf_logging_add_output): Enable an output module for this context.

* serf.h
  (serf_log_output_t, serf_log_layout_t): New typedefs.
  (SERF_LOG_DEFAULT_LAYOUT): New placeholder define.
  (serf_logging_create_stream_output,
   serf_logging_add_output): New declarations.

* serf_private.h
  (SERF_LOGGING_ENABLED): Enable logging by default.
  (serf_context_t): Cache config object.


git-svn-id: http://serf.googlecode.com/svn/trunk@2222 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
Follow up to r2222: Fix the code to enable logging for testing.

* logging.c
  (log_baton_t): Remove obsolete variables level & comps.
  (serf__log_init): Save the log_baton first before it's used to add the log
       output.


git-svn-id: http://serf.googlecode.com/svn/trunk@2223 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
Add flag to scons to disable logging at compile time.

* SConstruct
  (DISABLE_LOGGING): New parameter. Pass SERF_DISABLE_LOGGING flag to compiler
       when set.

* serf_private.h
  (SERF_LOGGING_ENABLED): Enable only when SERF_DISABLE_LOGGING is not set.
  


git-svn-id: http://serf.googlecode.com/svn/trunk@2224 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845