From ca49cf90b4223158254a3bc975608882c2ffd58a Mon Sep 17 00:00:00 2001 From: Mikayla Fischler Date: Tue, 29 Aug 2023 22:34:30 -0400 Subject: [PATCH] #305 improved log message clarity --- supervisor/unitlogic.lua | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/supervisor/unitlogic.lua b/supervisor/unitlogic.lua index 6203c12..9c78f83 100644 --- a/supervisor/unitlogic.lua +++ b/supervisor/unitlogic.lua @@ -472,13 +472,15 @@ function logic.update_alarms(self) -- Reactor Damage local rps_dmg_90 = plc_cache.rps_status.high_dmg and not self.last_rps_trips.high_dmg if (_update_alarm_state(self, (plc_cache.damage > 0) or rps_dmg_90, self.alarms.ReactorDamage)) then - log.debug(util.c("> plc_cache.damage[", plc_cache.damage, "] rps_dmg_90[", rps_dmg_90, "]")) + log.debug(util.c(">> Trip Detail Report for ", types.ALARM_NAMES[self.alarms.ReactorDamage.id]," <<")) + log.debug(util.c("| plc_cache.damage[", plc_cache.damage, "] rps_dmg_90[", rps_dmg_90, "]")) end -- Over-Temperature local rps_high_temp = plc_cache.rps_status.high_temp and not self.last_rps_trips.high_temp if (_update_alarm_state(self, (plc_cache.temp >= 1200) or rps_high_temp, self.alarms.ReactorOverTemp)) then - log.debug(util.c("> plc_cache.temp[", plc_cache.temp, "] rps_high_temp[", rps_high_temp, "]")) + log.debug(util.c(">> Trip Detail Report for ", types.ALARM_NAMES[self.alarms.ReactorOverTemp.id]," <<")) + log.debug(util.c("| plc_cache.temp[", plc_cache.temp, "] rps_high_temp[", rps_high_temp, "]")) end -- High Temperature @@ -490,7 +492,8 @@ function logic.update_alarms(self) -- High Waste local rps_high_waste = plc_cache.rps_status.ex_waste and not self.last_rps_trips.ex_waste if (_update_alarm_state(self, (plc_cache.waste > ALARM_LIMS.HIGH_WASTE) or rps_high_waste, self.alarms.ReactorHighWaste)) then - log.debug(util.c("> plc_cache.waste[", plc_cache.waste, "] rps_high_waste[", rps_high_waste, "]")) + log.debug(util.c(">> Trip Detail Report for ", types.ALARM_NAMES[self.alarms.ReactorHighWaste.id]," <<")) + log.debug(util.c("| plc_cache.waste[", plc_cache.waste, "] rps_high_waste[", rps_high_waste, "]")) end -- RPS Transient (excludes timeouts and manual trips) @@ -523,9 +526,10 @@ function logic.update_alarms(self) end if (_update_alarm_state(self, rcs_trans, self.alarms.RCSTransient)) then - log.debug(util.c("> any_low[", any_low, "] any_over[", any_over, "] gen_trip[", gen_trip, "]")) - log.debug(util.c("> RCPTrip[", annunc.RCPTrip, "] MaxWaterReturnFeed[", annunc.MaxWaterReturnFeed, "]")) - log.debug(util.c("> RCSFlowLow[", annunc.RCSFlowLow, "] BoilRateMismatch[", annunc.BoilRateMismatch, + log.debug(util.c(">> Trip Detail Report for ", types.ALARM_NAMES[self.alarms.RCSTransient.id]," <<")) + log.debug(util.c("| any_low[", any_low, "] any_over[", any_over, "] gen_trip[", gen_trip, "]")) + log.debug(util.c("| RCPTrip[", annunc.RCPTrip, "] MaxWaterReturnFeed[", annunc.MaxWaterReturnFeed, "]")) + log.debug(util.c("| RCSFlowLow[", annunc.RCSFlowLow, "] BoilRateMismatch[", annunc.BoilRateMismatch, "] CoolantFeedMismatch[", annunc.CoolantFeedMismatch, "] SteamFeedMismatch[", annunc.SteamFeedMismatch, "]")) end