UNPKG

1.01 kBJavaScriptView Raw
1"use strict";
2var __read = (this && this.__read) || function (o, n) {
3 var m = typeof Symbol === "function" && o[Symbol.iterator];
4 if (!m) return o;
5 var i = m.call(o), r, ar = [], e;
6 try {
7 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
8 }
9 catch (error) { e = { error: error }; }
10 finally {
11 try {
12 if (r && !r.done && (m = i["return"])) m.call(i);
13 }
14 finally { if (e) throw e.error; }
15 }
16 return ar;
17};
18module.exports = function (ctx) {
19 ctx.commander.register('logger', 'logger Message', function () {
20 var args = ctx.args._ || [];
21 var _a = __read(args, 2), types = _a[0], msg = _a[1];
22 switch (types) {
23 case 'info':
24 case 'warn':
25 case 'error':
26 ctx.logger[types](msg);
27 break;
28 default:
29 console.log('nothing types');
30 break;
31 }
32 });
33};
34//# sourceMappingURL=logger.js.map
\No newline at end of file