@spinajs/log 1.2.7 → 1.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4 @@
1
+ import { Bootstrapper } from "@spinajs/di";
2
+ export declare class LogBotstrapper extends Bootstrapper {
3
+ bootstrap(): Promise<void>;
4
+ }
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.LogBotstrapper = void 0;
10
+ const di_1 = require("@spinajs/di");
11
+ const log_1 = require("./log");
12
+ const log_configuration_1 = require("./schemas/log.configuration");
13
+ let LogBotstrapper = class LogBotstrapper extends di_1.Bootstrapper {
14
+ async bootstrap() {
15
+ di_1.DI.register(log_configuration_1.default).asArrayValue("__configurationSchema__");
16
+ process.on("uncaughtException", (err) => {
17
+ const log = di_1.DI.resolve(log_1.Log, ["process"]);
18
+ log.fatal(err, "Unhandled exception occured");
19
+ });
20
+ process.on("unhandledRejection", (reason, p) => {
21
+ const log = di_1.DI.resolve(log_1.Log, ["process"]);
22
+ log.fatal(reason, "Unhandled rejection at Promise %s", p);
23
+ });
24
+ }
25
+ };
26
+ LogBotstrapper = __decorate([
27
+ di_1.Autoinject
28
+ ], LogBotstrapper);
29
+ exports.LogBotstrapper = LogBotstrapper;
30
+ //# sourceMappingURL=bootstrap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../src/bootstrap.ts"],"names":[],"mappings":";;;;;;;;;AAAA,oCAA2D;AAC3D,+BAA4B;AAC5B,mEAA+D;AAG/D,IAAa,cAAc,GAA3B,MAAa,cAAe,SAAQ,iBAAY;IACvC,KAAK,CAAC,SAAS;QACpB,OAAE,CAAC,QAAQ,CAAC,2BAAoB,CAAC,CAAC,YAAY,CAAC,yBAAyB,CAAC,CAAC;QAE1E,OAAO,CAAC,EAAE,CAAC,mBAAmB,EAAE,CAAC,GAAG,EAAE,EAAE;YACtC,MAAM,GAAG,GAAG,OAAE,CAAC,OAAO,CAAC,SAAG,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;YACzC,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,6BAA6B,CAAC,CAAC;QAChD,CAAC,CAAC,CAAC;QAEH,OAAO,CAAC,EAAE,CAAC,oBAAoB,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC7C,MAAM,GAAG,GAAG,OAAE,CAAC,OAAO,CAAC,SAAG,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;YACzC,GAAG,CAAC,KAAK,CAAC,MAAe,EAAE,mCAAmC,EAAE,CAAC,CAAC,CAAC;QACrE,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAdY,cAAc;IAD1B,eAAU;GACE,cAAc,CAc1B;AAdY,wCAAc"}
package/lib/index.d.ts CHANGED
@@ -16,3 +16,4 @@ export * from "./targets";
16
16
  export * from "./variables";
17
17
  export * from "./log";
18
18
  export * from "./decorators";
19
+ export * from "./bootstrap";
package/lib/index.js CHANGED
@@ -29,4 +29,5 @@ __exportStar(require("./targets"), exports);
29
29
  __exportStar(require("./variables"), exports);
30
30
  __exportStar(require("./log"), exports);
31
31
  __exportStar(require("./decorators"), exports);
32
+ __exportStar(require("./bootstrap"), exports);
32
33
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;;;;;GAOG;AACH,yCAAuC;AAEvC;;GAEG;AACH,sEAAoE;AAEpE,sDAAoC;AACpC,4CAA0B;AAC1B,8CAA4B;AAC5B,wCAAsB;AACtB,+CAA6B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;;;;;GAOG;AACH,yCAAuC;AAEvC;;GAEG;AACH,sEAAoE;AAEpE,sDAAoC;AACpC,4CAA0B;AAC1B,8CAA4B;AAC5B,wCAAsB;AACtB,+CAA6B;AAC7B,8CAA4B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spinajs/log",
3
- "version": "1.2.7",
3
+ "version": "1.2.8",
4
4
  "description": "Log lib for all spinejs related libs",
5
5
  "main": "lib/index.js",
6
6
  "private": false,
@@ -41,5 +41,5 @@
41
41
  "devDependencies": {
42
42
  "@types/color": "^3.0.3"
43
43
  },
44
- "gitHead": "389cf142b4ca63b7850b93fc858184ddcbb43ce1"
44
+ "gitHead": "4775754b5957d77f76d6ebcbdb947f8940ed167d"
45
45
  }