From 358735221936935b9930f510f8f3ae942f9c750b Mon Sep 17 00:00:00 2001
From: Mikayla Fischler <mikayla@ky8.io>
Date: Fri, 29 Apr 2022 13:20:56 -0400
Subject: [PATCH] log exit notices as info messages not warnings

---
 reactor-plc/threads.lua | 10 +++++-----
 rtu/threads.lua         |  6 +++---
 supervisor/startup.lua  |  2 +-
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/reactor-plc/threads.lua b/reactor-plc/threads.lua
index eb3c026..93a243e 100644
--- a/reactor-plc/threads.lua
+++ b/reactor-plc/threads.lua
@@ -168,7 +168,7 @@ function thread__main(smem, init)
             if event == "terminate" or ppm.should_terminate() then
                 -- iss handles reactor shutdown
                 plc_state.shutdown = true
-                log._warning("terminate requested, main thread exiting")
+                log._info("terminate requested, main thread exiting")
                 break
             end
         end
@@ -267,7 +267,7 @@ function thread__iss(smem)
             -- check for termination request
             if plc_state.shutdown then
                 -- safe exit
-                log._warning("iss thread shutdown initiated")
+                log._info("iss thread shutdown initiated")
                 if plc_state.init_ok then
                     plc_state.scram = true
                     reactor.scram()
@@ -280,7 +280,7 @@ function thread__iss(smem)
                         log._error("iss thread failed to SCRAM reactor on exit")
                     end
                 end
-                log._warning("iss thread exiting")
+                log._info("iss thread exiting")
                 break
             end
 
@@ -331,7 +331,7 @@ function thread__comms_tx(smem)
 
             -- check for termination request
             if plc_state.shutdown then
-                log._warning("comms tx thread exiting")
+                log._info("comms tx thread exiting")
                 break
             end
 
@@ -379,7 +379,7 @@ function thread__comms_rx(smem)
 
             -- check for termination request
             if plc_state.shutdown then
-                log._warning("comms rx thread exiting")
+                log._info("comms rx thread exiting")
                 break
             end
 
diff --git a/rtu/threads.lua b/rtu/threads.lua
index 8aef13f..c5af330 100644
--- a/rtu/threads.lua
+++ b/rtu/threads.lua
@@ -121,7 +121,7 @@ function thread__main(smem)
             -- check for termination request
             if event == "terminate" or ppm.should_terminate() then
                 rtu_state.shutdown = true
-                log._warning("terminate requested, main thread exiting")
+                log._info("terminate requested, main thread exiting")
                 break
             end
         end
@@ -169,7 +169,7 @@ function thread__comms(smem)
 
             -- check for termination request
             if rtu_state.shutdown then
-                log._warning("comms thread exiting")
+                log._info("comms thread exiting")
                 break
             end
 
@@ -218,7 +218,7 @@ function thread__unit_comms(smem, unit)
 
             -- check for termination request
             if rtu_state.shutdown then
-                log._warning("rtu unit thread exiting -> " .. unit.name .. "(" .. unit.type .. ")")
+                log._info("rtu unit thread exiting -> " .. unit.name .. "(" .. unit.type .. ")")
                 break
             end
 
diff --git a/supervisor/startup.lua b/supervisor/startup.lua
index 1e5396d..917280d 100644
--- a/supervisor/startup.lua
+++ b/supervisor/startup.lua
@@ -100,7 +100,7 @@ while true do
 
     -- check for termination request
     if event == "terminate" or ppm.should_terminate() then
-        log._warning("terminate requested, exiting...")
+        log._info("terminate requested, exiting...")
         break
     end
 end