UNPKG

@saber2pr/nana

Version:
16 lines (15 loc) 720 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var print_1 = require("./print"); exports.log = function (c) { return function (request, _) { if (!c) return; c.url && print_1.Print.tips("Nana watch-url:[" + decodeURI(request.url) + "]"); c.method && print_1.Print.tips("Nana watch-method:[" + request.method + "]"); c.statusCode && print_1.Print.tips("Nana watch-statusCode:[" + request.statusCode + "]"); c.statusMessage && print_1.Print.tips("Nana watch-statusMessage:[" + request.statusMessage + "]"); c.headers && print_1.Print.tips("Nana watch-headers:[" + JSON.stringify(request.headers, null, 2) + "]"); }; }; exports.__logconfig = {};