summaryrefslogtreecommitdiff
path: root/src/Logging.ml
diff options
context:
space:
mode:
authorSon Ho2022-01-07 11:00:05 +0100
committerSon Ho2022-01-07 11:00:05 +0100
commitdbbb01630190d999d3932fabd8a181b4f826f64f (patch)
tree0011dda53aaeb88919b3354a9be5b21dca2aa45a /src/Logging.ml
parenta310c6036568d8f62e09804c67064686d106afd4 (diff)
Improve logging and introduce eval_operands_prepare
Diffstat (limited to '')
-rw-r--r--src/Logging.ml13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Logging.ml b/src/Logging.ml
index a1060014..ccf63d0d 100644
--- a/src/Logging.ml
+++ b/src/Logging.ml
@@ -3,8 +3,21 @@ module L = Easy_logging.Logging
let _ = L.make_logger "MainLogger" Debug [ Cli Debug ]
+(** The main logger *)
let log = L.get_logger "MainLogger"
+(** Below, we create subgloggers for various submodules, so that we can precisely
+ toggle logging on/off, depending on which information we need *)
+
+(** Logger for InterpreterStatements *)
+let statements_log = L.get_logger "MainLogger.Statements"
+
+(** Logger for InterpreterExpansion *)
+let expansion_log = L.get_logger "MainLogger.Statements.Expansion"
+
+(** Logger for InterpreterExpressions *)
+let expressions_log = L.get_logger "MainLogger.Statements.Expressions"
+
(** Terminal colors - TODO: comes from easy_logging (did not manage to reuse the module directly) *)
type color =
| Default