feat: add configuration tunable for logging enablement
[e-mobility-charging-stations-simulator.git] / src / utils / Configuration.ts
index 6f53ef3bd92e796d7f9be4fd049df4b88f8be6d9..b67afd447ae0f2ebc7a6f80f53bdfa5f57dfdf8f 100644 (file)
@@ -234,6 +234,12 @@ export class Configuration {
     return Configuration.getWorker().processType === WorkerProcessType.dynamicPool;
   }
 
+  public static getLogEnabled(): boolean | undefined {
+    return Utils.hasOwnProp(Configuration.getConfig(), 'logEnabled')
+      ? Configuration.getConfig()?.logEnabled
+      : true;
+  }
+
   public static getLogConsole(): boolean | undefined {
     Configuration.warnDeprecatedConfigurationKey(
       'consoleLog',