@spinajs/log
Advanced tools
Comparing version 1.2.48 to 1.2.49
@@ -1,14 +0,1 @@ | ||
/** | ||
* We export default configuration for webpack modules | ||
* Normally we load configuration from disk via filesystem | ||
* But webpack is bundlig all files into one. | ||
* | ||
* When we export, we can see configuration variable | ||
* in webpack module cache and webpack config loader can see it | ||
*/ | ||
export * as config from "./config/log"; | ||
/** | ||
* Same issue with schemas | ||
*/ | ||
export * as CONFIGURATION_SCHEMA from "./schemas/log.configuration"; | ||
export * from "@spinajs/log-common"; | ||
@@ -15,0 +2,0 @@ export * from "./targets"; |
@@ -13,16 +13,2 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.CONFIGURATION_SCHEMA = exports.config = void 0; | ||
/** | ||
* We export default configuration for webpack modules | ||
* Normally we load configuration from disk via filesystem | ||
* But webpack is bundlig all files into one. | ||
* | ||
* When we export, we can see configuration variable | ||
* in webpack module cache and webpack config loader can see it | ||
*/ | ||
exports.config = require("./config/log"); | ||
/** | ||
* Same issue with schemas | ||
*/ | ||
exports.CONFIGURATION_SCHEMA = require("./schemas/log.configuration"); | ||
__exportStar(require("@spinajs/log-common"), exports); | ||
@@ -29,0 +15,0 @@ __exportStar(require("./targets"), exports); |
@@ -72,3 +72,14 @@ "use strict"; | ||
const config = this.Container.get(types_1.Configuration); | ||
this.Options = config.get("logger"); | ||
if (!config) { | ||
throw new Error(`Configuration module is not avaible. Please resolve configuration module before any logging can occur`); | ||
} | ||
this.Options = config.get("logger", { | ||
targets: [ | ||
{ | ||
name: "Console", | ||
type: "ConsoleTarget", | ||
}, | ||
], | ||
rules: [{ name: "*", level: "trace", target: "Console" }], | ||
}); | ||
this.matchRulesToLogger(); | ||
@@ -75,0 +86,0 @@ this.resolveLogTargets(); |
{ | ||
"name": "@spinajs/log", | ||
"version": "1.2.48", | ||
"version": "1.2.49", | ||
"description": "Log lib for all spinejs related libs", | ||
@@ -29,6 +29,6 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@spinajs/configuration": "^1.2.48", | ||
"@spinajs/configuration": "^1.2.49", | ||
"@spinajs/di": "^1.2.32", | ||
"@spinajs/exceptions": "^1.2.7", | ||
"@spinajs/log-common": "^1.2.30", | ||
"@spinajs/log-common": "^1.2.49", | ||
"ajv": "^8.8.2", | ||
@@ -45,3 +45,3 @@ "colors": "^1.4.0", | ||
}, | ||
"gitHead": "134abbafa841f6a59776c06c7581bc90de8bf8d5" | ||
"gitHead": "b99fad4bd66e441a62707c689e96d94ebeb483ad" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
194826
1477