 
     transferred_headers.host = url.host
 
-    log transferred_headers
+    debug_log transferred_headers
 
     srcReq = src.request 'GET', query_path, transferred_headers
 

    src = Http.createClient url.port || 80, url.hostname

    src.on 'error', (error) ->
      four_oh_four(resp, "Client Request error #{error.stack}")

    query_path = url.pathname
    if url.query?

logging_enabled = process.env.CAMO_LOGGING_ENABLED || "disabled"
connect_timeout = process.env.CAMO_CONNECT_TIMEOUT || 10

debug_log = (msg) ->
  if logging_enabled == "debug"
    console.log("--------------------------------------------")
    console.log(msg)
    console.log("--------------------------------------------")

error_log = (msg) ->
  unless logging_enabled == "disabled"
    console.error("[#{new Date().toISOString()}] #{msg}")

total_connections   = 0
current_connections = 0
started_at          = new Date

four_oh_four = (resp, msg, url) ->
  error_log "#{msg}: #{url?.format() or 'unknown'}"
  resp.writeHead 404
  finish resp, "Not Found"

