new: added new log builtin function for sync logging with prompt

This commit is contained in:
evilsocket 2018-01-11 02:00:30 +01:00
parent acbc10d4e8
commit d87bf8a3ba
4 changed files with 16 additions and 6 deletions

View file

@ -1,5 +1,4 @@
var RESET = "\033[0m";
var log = console.log;
function R(s) {
return "\033[31m" + s + RESET;
@ -119,7 +118,7 @@ function dumpRaw(req) {
}
function onRequest(req, res) {
log( BOLD(req.Client), ">", B(req.Method), req.Hostname + req.Path + ( req.Query ? "?" + req.Query : '') );
log( BOLD(req.Client), " > ", B(req.Method), req.Hostname + req.Path + ( req.Query ? "?" + req.Query : '') );
dumpHeaders(req);