mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2024-08-30 18:22:34 +00:00
log init parameters in config files
This commit is contained in:
@ -6,3 +6,9 @@ REACTOR_ID = 1
|
|||||||
SERVER_PORT = 16000
|
SERVER_PORT = 16000
|
||||||
-- port to listen to incoming packets FROM server
|
-- port to listen to incoming packets FROM server
|
||||||
LISTEN_PORT = 14001
|
LISTEN_PORT = 14001
|
||||||
|
-- log path
|
||||||
|
LOG_PATH = "/log.txt"
|
||||||
|
-- log mode
|
||||||
|
-- 0 = APPEND (adds to existing file on start)
|
||||||
|
-- 1 = NEW (replaces existing file on start)
|
||||||
|
LOG_MODE = 0
|
||||||
|
@ -19,7 +19,7 @@ local println = util.println
|
|||||||
local print_ts = util.print_ts
|
local print_ts = util.print_ts
|
||||||
local println_ts = util.println_ts
|
local println_ts = util.println_ts
|
||||||
|
|
||||||
log.init("/log.txt", log.MODE.APPEND)
|
log.init(config.LOG_PATH, config.LOG_MODE)
|
||||||
|
|
||||||
log._info("========================================")
|
log._info("========================================")
|
||||||
log._info("BOOTING reactor-plc.startup " .. R_PLC_VERSION)
|
log._info("BOOTING reactor-plc.startup " .. R_PLC_VERSION)
|
||||||
|
@ -4,6 +4,12 @@
|
|||||||
SERVER_PORT = 16000
|
SERVER_PORT = 16000
|
||||||
-- port to listen to incoming packets FROM server
|
-- port to listen to incoming packets FROM server
|
||||||
LISTEN_PORT = 15001
|
LISTEN_PORT = 15001
|
||||||
|
-- log path
|
||||||
|
LOG_PATH = "/log.txt"
|
||||||
|
-- log mode
|
||||||
|
-- 0 = APPEND (adds to existing file on start)
|
||||||
|
-- 1 = NEW (replaces existing file on start)
|
||||||
|
LOG_MODE = 0
|
||||||
-- RTU peripheral devices (named: side/network device name)
|
-- RTU peripheral devices (named: side/network device name)
|
||||||
RTU_DEVICES = {
|
RTU_DEVICES = {
|
||||||
{
|
{
|
||||||
|
@ -26,7 +26,7 @@ local println = util.println
|
|||||||
local print_ts = util.print_ts
|
local print_ts = util.print_ts
|
||||||
local println_ts = util.println_ts
|
local println_ts = util.println_ts
|
||||||
|
|
||||||
log.init("/log.txt", log.MODE.APPEND)
|
log.init(config.LOG_PATH, config.LOG_MODE)
|
||||||
|
|
||||||
log._info("========================================")
|
log._info("========================================")
|
||||||
log._info("BOOTING rtu.startup " .. RTU_VERSION)
|
log._info("BOOTING rtu.startup " .. RTU_VERSION)
|
||||||
|
@ -4,3 +4,9 @@ SCADA_DEV_LISTEN = 16000
|
|||||||
SCADA_SV_LISTEN = 16100
|
SCADA_SV_LISTEN = 16100
|
||||||
-- expected number of reactors
|
-- expected number of reactors
|
||||||
NUM_REACTORS = 4
|
NUM_REACTORS = 4
|
||||||
|
-- log path
|
||||||
|
LOG_PATH = "/log.txt"
|
||||||
|
-- log mode
|
||||||
|
-- 0 = APPEND (adds to existing file on start)
|
||||||
|
-- 1 = NEW (replaces existing file on start)
|
||||||
|
LOG_MODE = 0
|
||||||
|
@ -25,7 +25,7 @@ local println = util.println
|
|||||||
local print_ts = util.print_ts
|
local print_ts = util.print_ts
|
||||||
local println_ts = util.println_ts
|
local println_ts = util.println_ts
|
||||||
|
|
||||||
log.init("/log.txt", log.MODE.APPEND)
|
log.init(config.LOG_PATH, config.LOG_MODE)
|
||||||
|
|
||||||
log._info("========================================")
|
log._info("========================================")
|
||||||
log._info("BOOTING supervisor.startup " .. SUPERVISOR_VERSION)
|
log._info("BOOTING supervisor.startup " .. SUPERVISOR_VERSION)
|
||||||
|
Reference in New Issue
Block a user