Dump logger by script

Hi,

Is there a way using scripting to dump the content of the gateway logger? I would like to do it automaticly.

Thanks.

It’s already dumped as the wrapper log file. Configure your log rotation service to preserve it as you see fit.

Where in Ignition do I do that?

It’s not in Ignition. It’s an OS service. See /etc/logrotate.conf, and on most distros, /etc/logrotate.d/*.

Actually, the wrapper.log is controlled by the Tanuki service wrapper; configuration is available in the ignition.conf file in the /data/ directory:
https://wrapper.tanukisoftware.com/doc/english/props-logging.html

Well, some choices are available. Logrotate offers many more.

Ok. But is there a way to dump the content of the logger every day in idb format? I like usind DB Browser for SQL Lite to search in.

You could use a gateway timer script to simply copy the system_logs.idb file in the Ignition installation directory. Rotating it would be up to you.

Is it safe to copy this file while the gateway is running?