Fortiphyd / GRFICSv2

Version 2 of the Graphical Realism Framework for Industrial Control Simulation (GRFICS)
GNU General Public License v3.0
377 stars 68 forks source link

PLC logs #22

Open ReetChauhan opened 4 weeks ago

ReetChauhan commented 4 weeks ago

Where can I find all the logs

aliteke commented 2 weeks ago

Hello ReetChauhan, GRFICSv2 is using OpenPLC for the PLC virtual machine. Once you start the OpenPLC (sudo nodejs server.js), you can see the logs generated on the fly from http://localhost:8080/viewLogs.

However, they are not written to a log file. OpenPLC authors designed it that way since a real PLC would not write logs either (https://github.com/thiagoralves/OpenPLC_v3/issues/123).

That being said, you can modify the GRFICSv2/plc_vm/OpenPLC_v2_master/server.js to write to a file. All the log output you see at http://localhost:8080/viewLogs are hold in a variable var plcLog (https://github.com/Fortiphyd/GRFICSv2/blob/master/plc_vm/OpenPLC_v2-master/server.js#L6)