diff --git a/backend/src/core/logger.py b/backend/src/core/logger.py index ff8e4b02..ed37d40e 100755 --- a/backend/src/core/logger.py +++ b/backend/src/core/logger.py @@ -280,8 +280,10 @@ def explore(self, msg, *args, **kwargs): # #endregion explore -# #region reason [C:2] [TYPE Function] [SEMANTICS log,reason,marker,debug] -# @BRIEF Logs a REASON marker (DEBUG level) with structured extra data for CotJsonFormatter. +# #region reason [C:2] [TYPE Function] [SEMANTICS log,reason,marker,info] +# @BRIEF Logs a REASON marker (INFO level) with structured extra data for CotJsonFormatter. +# @RATIONALE INFO level per molecular CoT protocol: REASON is the primary reasoning bond +# and must be visible in production. DEBUG is reserved for high-frequency loops. def reason(self, msg, *args, **kwargs): """Log a REASON marker — strict deduction, core logic. @@ -293,12 +295,14 @@ def reason(self, msg, *args, **kwargs): if error_val is not None: extra['error'] = error_val extra.update(user_extra) - self.debug(msg, *args, extra=extra, **kwargs) + self.info(msg, *args, extra=extra, **kwargs) # #endregion reason -# #region reflect [C:2] [TYPE Function] [SEMANTICS log,reflect,marker,debug] -# @BRIEF Logs a REFLECT marker (DEBUG level) with structured extra data for CotJsonFormatter. +# #region reflect [C:2] [TYPE Function] [SEMANTICS log,reflect,marker,info] +# @BRIEF Logs a REFLECT marker (INFO level) with structured extra data for CotJsonFormatter. +# @RATIONALE INFO level per molecular CoT protocol: REFLECT verifies outcomes and +# must be visible in production. DEBUG is reserved for high-frequency loops. def reflect(self, msg, *args, **kwargs): """Log a REFLECT marker — self-check, structural validation. @@ -310,7 +314,7 @@ def reflect(self, msg, *args, **kwargs): if error_val is not None: extra['error'] = error_val extra.update(user_extra) - self.debug(msg, *args, extra=extra, **kwargs) + self.info(msg, *args, extra=extra, **kwargs) # #endregion reflect logger.explore = types.MethodType(explore, logger)