Log Project Creation and Modification Timestamps to Database via Gateway Script

Hi Team,

I'm trying to store a record in the database whenever a project is newly created or modified. I've used the audit log option and also created a local SQL table for this purpose. While the setup works at the project level, I need to detect changes occurring at the Gateway level.

I'm using a Gateway Event Timer Script to run this logic. It successfully records when a new project is created on the gateway, including the project name and timestamp. However, it does not detect modifications to existing projects — even after saving changes, it still shows the old timestamp.

Once the data is recorded in the database, I also trigger an email notification.

I've attached the Gateway Event Timer Script below.

I would appreciate any suggestions, improvements, or alternate approaches to reliably capture both project creation and modification events at the gateway level.

ProjectChange_Logs.txt (3.0 KB)

You’ve tried gateway audit log setting?

1 Like

Hi ,

I've tried that, but audit logs need to be configured individually in every project, which is challenging while production is running. Therefore, I’m planning to create a common Gateway Event Timer Script that fetches the list of projects from the gateway—whether newly created or modified—and records their timestamps in the database. Without relying on the audit log concept, could you please suggest any alternative approaches?

Just so we’re on the same page - you don’t need gateway event timer scripts to do what you’ve described thusfar - the gateway itself (not individual projects) can be assigned an audit profile. Is that what you’ve done?

I've tried this. Once I created the audit log, the table was successfully created in the database. Then, I enabled audit logging for the project by going to Project Browser > Properties > General > Enable Audit Log. After that, the values started recording in the database—but only for that specific project.

However, what I need is a solution that automatically records the project name along with the timestamp in the database whenever a new project is created or an existing project is modified on the gateway—without requiring audit log configuration in each project.

You’re still not telling us if you’ve assigned the gateway audit profile from the gateway configuration webpage (Config>Security>General>Gateway Audit Profile) - not the designer project properties. Creating the audit log is not the same as assigning it to the gateway’s audit profile setting. I believe this will do exactly what you want.

Individual project level audit logs are separate and probably won’t do what you want. But theoretically assigning one in “production” isn’t a big deal. I don’t have a gateway to test, but I don’t believe it triggers any sort of project restart. Maybe create a dummy project and test it out.


I've attached the screenshot showing the audit log I created on my local system—this is what you were trying to explain.

No - that’s just the audit log definition


Yes i got that, but what next

lol scroll down to the bottom


this is last

Can’t tell if you’re just trolling now…

Okay, I will configure it. Once it's configured, how can I retrieve all project details? Do I need a script for that?

Query the table directly or system.util.queryAuditLog

Can also insert arbitrary records with system.util.audit | Ignition User Manual

Thanks for your support. I’ll work on it and let you know.

1 Like


Here are the logs, but only the project I opened has logs created. I created a new project in the gateway, but no logs were generated for it.

Well according to this, it should’ve been logged (I don’t have gateway to test at the moment)

Thanks for your support. The data was recorded successfully.This is recording in my local , However, I have a question: why do we configure the audit log under Config > Security > General > Gateway Audit Profile, and what is the difference between this and the configuration under Designer Project > Project Browser > Project Properties > Project > General > Auditing > Enable Audit Profile?

If we go into heavy production, how does the configuration under Config > Security > General > Gateway Audit Profile affect the gateway’s memory or performance? Could this cause any production issues, especially since multiple tabs and projects are used routinely on the shop floor during shifts?

The former is for purely gateway-wide events. The latter is for project-specific events. :man_shrugging:

2 Likes