I saw that every C++ PCWLX programs classes derive from ‘Loggable’ Is it possible to use this to add our own logs into the /opt/plcnext/logs/output.log or other files ? Do you have a clean cut documentation on this subject ? Demo ? Thanks
Hi, you can simply write to the log output:
Log::Info("Log entry {0}", someVariable);I think the log system is based on log4cplus. The configuration for the logger instances can be found in the file
/etc/plcnext/AXCF2152.log.ini
hi Dzmitry, You can probably use the build-in features of syslog on the target, to transfer/stream your logs to a remote (capable) syslog server. This way you keep the controller in its original state, and have a central point in your topology to distribute/manage the logs to some off-site location (if desired of course). Do keep in mind that the default syslog-facilities do not use encryption, should that be an design consideration. cheers, Vincent
Hi Vincent, syslog is quite old and not very flexible, so what about to add syslog-ng as default logging service for the PLCnext?