exports.routeRequest = function(req, res) {
// first, unify the request
- console.log("request: ", req.url);
+ log.debug("request: ", req.url);
var thisQuery = unifyRequest(req, res, function(unified) {
- console.log("unified request is ", unified);
+ log.debug("unified request is ", unified);
if(unified.requestFor == "/favicon.ico") {
unified.b.writeHead(404, {"Content-Type": "text/plain"});
unified.b.write("404 Not Found\n");
} else if(unified.isDirectory) {
cache.serviceDirectory(unified);
} else {
- console.log("ERROR: something went majorly wrong with something, ", unified);
+ log.debug("ERROR: something went majorly wrong with something, ", unified);
}
} else {
// it doesnt exist yet, so we send it to the cache service if it matches an upstream service
if(typeof global.repoproxy.repo[unified.topPath] != "undefined") {
- console.log("file doesnt exist, upstream we go: ", unified);
+ log.debug("file doesnt exist, upstream we go: ", unified);
cache.upstreamRequest(unified);
} else {
unified.b.writeHead(404, {"Content-Type": "text/plain"});