analogger 1.36.0 → 1.37.0

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.
package/README.md CHANGED
@@ -704,6 +704,12 @@ const LOG_TARGETS = ["GROUP1", "GROUP2", "TOM", "TIM"/*, "ALL", "USER"*/];
704
704
  // Contexts define how the log should be seen
705
705
  const LOG_CONTEXTS = {STANDARD: null, TEST: {color: "#B18904", symbol: "⏰"}, C1: null, C2: null, C3: null, DEFAULT: {}}
706
706
 
707
+ // Important. Set the default behaviour.
708
+ // By default, no log will be displayed when the target is missing from `anaLogger.log`
709
+ anaLogger.setDefaultContext({
710
+ target: DEFAULT_LOG_TARGETS.NONE // or "NONE" (value can be "ALL", "NONE", "USER")
711
+ })
712
+
707
713
  // LOG_CONTEXTS will be modified by setContexts
708
714
  anaLogger.setContexts(LOG_CONTEXTS);
709
715
 
@@ -726,7 +732,7 @@ anaLogger.log({target: "TOM"}, `You will see this`);
726
732
  anaLogger.log({target: "TIM"}, `You will not see this`);
727
733
  anaLogger.log({target: "GROUP1"}, `You will see this`);
728
734
 
729
- // To work, we should have called `anaLogger.setTargets(["NonDefinedTarget"])`
735
+ // By default, the system will not display logs for non-targeted users (@see setDefaultContext above)
730
736
  anaLogger.setActiveTarget("NonDefinedTarget");
731
737
  anaLogger.log({lid: "WEB35388"}, `You will not see this`);
732
738
  anaLogger.log({lid: "WEB35388", target: "NonDefinedTarget"}, `You will not see this`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "analogger",
3
- "version": "1.36.0",
3
+ "version": "1.37.0",
4
4
  "description": "Js Logger",
5
5
  "main": "./src/ana-logger.cjs",
6
6
  "module": "./esm/src/ana-logger.mjs",
@@ -144,6 +144,7 @@ const symbolNames = {
144
144
  lock : "🔒",
145
145
  male_sign : "♂",
146
146
  minus_sign : "➖",
147
+ money_bag : "💰",
147
148
  no_entry : "⛔",
148
149
  old_key : "🗝️",
149
150
  partly_sunny : "⛅",