@transcommerce/cwm-shared 1.1.61 → 1.1.63
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.
|
@@ -163,11 +163,12 @@ class Stack {
|
|
|
163
163
|
* 4. Keeps track of the call stack and can group nested method calls if collapseGroups is set to true
|
|
164
164
|
*/
|
|
165
165
|
class ClassLoggerService {
|
|
166
|
+
constructor() { this.className = this.constructor.name; }
|
|
166
167
|
/*
|
|
167
168
|
* Determines what level of verbosity you want this service to log with.
|
|
168
169
|
* This can be set to 'None', 'Error', 'Warn', 'Info', 'Debug', or 'Trace'.
|
|
169
170
|
*/
|
|
170
|
-
logLevel =
|
|
171
|
+
logLevel = "Info"; // Default verbosity
|
|
171
172
|
/*
|
|
172
173
|
* Determine if method entry and exit points should be logged in collapsed groups
|
|
173
174
|
*/
|
|
@@ -214,7 +215,7 @@ class ClassLoggerService {
|
|
|
214
215
|
}
|
|
215
216
|
else {
|
|
216
217
|
this.callStack.push(value);
|
|
217
|
-
if (this.logLevel === '
|
|
218
|
+
if (this.logLevel === 'Trace') {
|
|
218
219
|
if (this.collapseGroups)
|
|
219
220
|
console.groupCollapsed(this.targetName);
|
|
220
221
|
else
|
|
@@ -230,7 +231,7 @@ class ClassLoggerService {
|
|
|
230
231
|
*/
|
|
231
232
|
endOfMethod() {
|
|
232
233
|
this.trace("End of method");
|
|
233
|
-
if (this.logLevel === '
|
|
234
|
+
if (this.logLevel === 'Trace') {
|
|
234
235
|
console.groupEnd();
|
|
235
236
|
console.timeEnd(this.targetName);
|
|
236
237
|
}
|
|
@@ -314,7 +315,7 @@ class ClassLoggerService {
|
|
|
314
315
|
}
|
|
315
316
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: ClassLoggerService, decorators: [{
|
|
316
317
|
type: Injectable
|
|
317
|
-
}] });
|
|
318
|
+
}], ctorParameters: () => [] });
|
|
318
319
|
|
|
319
320
|
function msalGuardConfigFactory(authConfig, injector) {
|
|
320
321
|
const logService = injector ? injector.get(ClassLoggerService, null) : null;
|
|
@@ -27377,7 +27378,7 @@ class ConfigService {
|
|
|
27377
27378
|
}
|
|
27378
27379
|
constructor(logger) {
|
|
27379
27380
|
this.logger = logger;
|
|
27380
|
-
this.logger.className = "ConfigService";
|
|
27381
|
+
this.logger.className = this.constructor.name; //"ConfigService";
|
|
27381
27382
|
this.configConnectString = "Endpoint=https://cheap-weed-menus-appconfig.azconfig.io;Id=tyjA;Secret=1FgL95lHkXViZX4Qf2GcRqn26mhTYDVYany8ToXpTnO68AzrdUUEJQQJ99AHAC8vTInIcYexAAACAZACsteF";
|
|
27382
27383
|
this.configClient = new AppConfigurationClient(this.configConnectString);
|
|
27383
27384
|
this.logger.debug("Config Client", this.configClient);
|
|
@@ -27438,10 +27439,12 @@ class ConfigService {
|
|
|
27438
27439
|
this.logger.debug("Using Cached Configuration", this.configCache);
|
|
27439
27440
|
}
|
|
27440
27441
|
const config = this.configCache;
|
|
27442
|
+
this.logger.logLevel = config.authConfig.logLevel;
|
|
27441
27443
|
this.logger.methodName = "";
|
|
27442
27444
|
return config;
|
|
27443
27445
|
}
|
|
27444
27446
|
async saveConfigAsync(config, company) {
|
|
27447
|
+
this.logger.logLevel = config.authConfig.logLevel;
|
|
27445
27448
|
this.logger.methodName = "saveConfigAsync()";
|
|
27446
27449
|
// Update configuration cache
|
|
27447
27450
|
this.configCache = config;
|
|
@@ -27504,7 +27507,7 @@ class InventoryApiService extends BaseApiService {
|
|
|
27504
27507
|
useMockData = false;
|
|
27505
27508
|
constructor(document, configService, httpClient, logger) {
|
|
27506
27509
|
super(document, configService, httpClient, logger);
|
|
27507
|
-
logger.className = "InventoryApiService";
|
|
27510
|
+
logger.className = this.constructor.name; //"InventoryApiService";
|
|
27508
27511
|
}
|
|
27509
27512
|
get httpHeaders() {
|
|
27510
27513
|
return new HttpHeaders()
|
|
@@ -27955,7 +27958,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
27955
27958
|
class SubscriptionApiService extends BaseApiService {
|
|
27956
27959
|
constructor(document, configService, httpClient, logger) {
|
|
27957
27960
|
super(document, configService, httpClient, logger);
|
|
27958
|
-
logger.className = "SubscriptionApiService";
|
|
27961
|
+
logger.className = this.constructor.name; //"SubscriptionApiService";
|
|
27959
27962
|
}
|
|
27960
27963
|
get apiFullUrl() {
|
|
27961
27964
|
return `${this.apiBaseUrl}${(this.config ?? DEFAULT_API_CONFIG).createSubscriptionApiRoute}`;
|