zcatalyst-cli
Version:
Command Line Tool for CATALYST
19 lines (18 loc) • 724 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const ansi_colors_1 = require("ansi-colors");
const index_1 = require("../util_modules/logger/index");
exports.default = (appSailDetails) => (req, _RES, next) => {
var _a;
(0, index_1.log)('info', '[' +
new Date().getTime() +
'] ' +
(appSailDetails ? (0, ansi_colors_1.cyan)(` Appsail[${(_a = appSailDetails === null || appSailDetails === void 0 ? void 0 : appSailDetails.target) === null || _a === void 0 ? void 0 : _a.name}] `) : '') +
' "' +
(0, ansi_colors_1.cyan)(req.method) +
'" ' +
' "' +
(0, ansi_colors_1.bold)(req.originalUrl) +
'"', true);
next();
};