irest-app-test
Version:
iRest is a zero-configuration application that allows you to easily create/manage APIs, generate random data on demand and perform operations on that data using REST interface.
1 lines • 1.33 kB
JavaScript
;var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=exports.customFormat=void 0;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties")),_winston=require("winston"),_excluded=["label","timestamp","level","message"],printf=_winston.format.printf,combine=_winston.format.combine,timestamp=_winston.format.timestamp,label=_winston.format.label,colorize=_winston.format.colorize,customFormat=function(a){var b=a.label,c=a.timestamp,d=a.level,e=a.message,f=(0,_objectWithoutProperties2["default"])(a,_excluded);return"".concat(b," ").concat(c," ").concat(d,": ").concat(e," ").concat("{}"===JSON.stringify(f)?"":JSON.stringify(f))};exports.customFormat=customFormat;var logger=(0,_winston.createLogger)({transports:[new _winston.transports.Console({level:"error",format:combine(colorize(),combine(colorize({all:!0}),label({label:"\n[Default Logger]"}),timestamp({format:"DD-MM-YY HH:MM:SS"}),printf(customFormat)))}),new _winston.transports.Console({level:"http",format:combine(colorize(),combine(colorize({all:!0}),label({label:"\n[Default Logger]"}),timestamp({format:"DD-MM-YY HH:MM:SS"}),printf(customFormat)))})]}),_default=logger;exports["default"]=_default;