# Log Project Creation and Modification Timestamps to Database via Gateway Script

**URL:** <https://forum.inductiveautomation.com/t/log-project-creation-and-modification-timestamps-to-database-via-gateway-script/105955>\
**Category:** Ignition\
**Created:** [May 7, 2025, 5:51am UTC](https://forum.inductiveautomation.com/t/log-project-creation-and-modification-timestamps-to-database-via-gateway-script/105955 "2025-05-07T05:51:59Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prasanth\_A](https://avatars.discourse-cdn.com/v4/letter/p/b38774/32.png) [@Prasanth\_A](https://forum.inductiveautomation.com/u/Prasanth_A)\
**Post date:** [May 7, 2025, 5:51am UTC](https://forum.inductiveautomation.com/t/log-project-creation-and-modification-timestamps-to-database-via-gateway-script/105955/1 "2025-05-07T05:51:59Z")

</div>

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](https://forum.inductiveautomation.com/uploads/short-url/p62n5KYYhaL3TPf4cckH2tqksGv.txt) (3.0 KB)

---

<div class="post-metadata">

**Author:** ![hunterdg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/hunterdg/32/67774_2.png) [@hunterdg](https://forum.inductiveautomation.com/u/hunterdg)\
**Post date:** [May 7, 2025, 5:53am UTC](https://forum.inductiveautomation.com/t/log-project-creation-and-modification-timestamps-to-database-via-gateway-script/105955/2 "2025-05-07T05:53:30Z")

</div>

You’ve tried gateway audit log setting?

---

<div class="post-metadata">

**Author:** ![Prasanth\_A](https://avatars.discourse-cdn.com/v4/letter/p/b38774/32.png) [@Prasanth\_A](https://forum.inductiveautomation.com/u/Prasanth_A)\
**Post date:** [May 8, 2025, 5:19am UTC](https://forum.inductiveautomation.com/t/log-project-creation-and-modification-timestamps-to-database-via-gateway-script/105955/3 "2025-05-08T05:19:18Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![hunterdg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/hunterdg/32/67774_2.png) [@hunterdg](https://forum.inductiveautomation.com/u/hunterdg)\
**Post date:** [May 8, 2025, 5:30am UTC](https://forum.inductiveautomation.com/t/log-project-creation-and-modification-timestamps-to-database-via-gateway-script/105955/4 "2025-05-08T05:30:28Z")

</div>

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?

> **[Auditing Actions Reference | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/platform/audit-log-and-profiles/auditing-action-reference#gateway-audit-actions)**
>
> The auditing system in Ignition records actions originating from the Gateway, Perspective, and Vision projects. This page describes the actions logged by the auditing system.

---

<div class="post-metadata">

**Author:** ![Prasanth\_A](https://avatars.discourse-cdn.com/v4/letter/p/b38774/32.png) [@Prasanth\_A](https://forum.inductiveautomation.com/u/Prasanth_A)\
**Post date:** [May 8, 2025, 5:44am UTC](https://forum.inductiveautomation.com/t/log-project-creation-and-modification-timestamps-to-database-via-gateway-script/105955/5 "2025-05-08T05:44:13Z")

</div>

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**.

---

<div class="post-metadata">

**Author:** ![hunterdg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/hunterdg/32/67774_2.png) [@hunterdg](https://forum.inductiveautomation.com/u/hunterdg)\
**Post date:** [May 8, 2025, 5:58am UTC](https://forum.inductiveautomation.com/t/log-project-creation-and-modification-timestamps-to-database-via-gateway-script/105955/6 "2025-05-08T05:58:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Prasanth\_A](https://avatars.discourse-cdn.com/v4/letter/p/b38774/32.png) [@Prasanth\_A](https://forum.inductiveautomation.com/u/Prasanth_A)\
**Post date:** [May 8, 2025, 6:07am UTC](https://forum.inductiveautomation.com/t/log-project-creation-and-modification-timestamps-to-database-via-gateway-script/105955/7 "2025-05-08T06:07:28Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/f/1f1f03b70699975930398f44f2aa38e277a97c9a.png)  
I've attached the screenshot showing the audit log I created on my local system—this is what you were trying to explain.

---

<div class="post-metadata">

**Author:** ![hunterdg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/hunterdg/32/67774_2.png) [@hunterdg](https://forum.inductiveautomation.com/u/hunterdg)\
**Post date:** [May 8, 2025, 6:11am UTC](https://forum.inductiveautomation.com/t/log-project-creation-and-modification-timestamps-to-database-via-gateway-script/105955/8 "2025-05-08T06:11:16Z")

</div>

No - that’s just the audit log _definition_

> [@hunterdg](#):
>
> Config\>Security\>General\>Gateway Audit Profile

> **[Audit Log and Profiles | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/platform/audit-log-and-profiles#enabling-auditing-for-gateway-scoped-actions)**
>
> Ignition's built-in auditing system automatically records certain actions that occur in the system, such as a Tag writes or User Source authentication, into a SQL database table. Utilizing the system involves creating an Audit Profile, followed by...

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/7/17085b2932282bf9503fd02b947dda11b5490847.png)

---

<div class="post-metadata">

**Author:** ![Prasanth\_A](https://avatars.discourse-cdn.com/v4/letter/p/b38774/32.png) [@Prasanth\_A](https://forum.inductiveautomation.com/u/Prasanth_A)\
**Post date:** [May 8, 2025, 6:21am UTC](https://forum.inductiveautomation.com/t/log-project-creation-and-modification-timestamps-to-database-via-gateway-script/105955/9 "2025-05-08T06:21:27Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/5/a53cdd07a33e915737d3984a5c2b2f6891031afd.png)  
Yes i got that, but what next

---

<div class="post-metadata">

**Author:** ![hunterdg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/hunterdg/32/67774_2.png) [@hunterdg](https://forum.inductiveautomation.com/u/hunterdg)\
**Post date:** [May 8, 2025, 6:22am UTC](https://forum.inductiveautomation.com/t/log-project-creation-and-modification-timestamps-to-database-via-gateway-script/105955/10 "2025-05-08T06:22:31Z")

</div>

lol scroll down to the bottom

> [@hunterdg](#):
>
> Gateway Audit Profile

---

<div class="post-metadata">

**Author:** ![Prasanth\_A](https://avatars.discourse-cdn.com/v4/letter/p/b38774/32.png) [@Prasanth\_A](https://forum.inductiveautomation.com/u/Prasanth_A)\
**Post date:** [May 8, 2025, 7:06am UTC](https://forum.inductiveautomation.com/t/log-project-creation-and-modification-timestamps-to-database-via-gateway-script/105955/11 "2025-05-08T07:06:07Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/8/b84afeba5f6c86f6d80a56c5f47c9eebb89bd038.png)  
this is last

---

<div class="post-metadata">

**Author:** ![hunterdg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/hunterdg/32/67774_2.png) [@hunterdg](https://forum.inductiveautomation.com/u/hunterdg)\
**Post date:** [May 8, 2025, 7:16am UTC](https://forum.inductiveautomation.com/t/log-project-creation-and-modification-timestamps-to-database-via-gateway-script/105955/12 "2025-05-08T07:16:39Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/0/c0a04993d1eee552fa657a4701090f895121c34a.jpeg)

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

---

<div class="post-metadata">

**Author:** ![Prasanth\_A](https://avatars.discourse-cdn.com/v4/letter/p/b38774/32.png) [@Prasanth\_A](https://forum.inductiveautomation.com/u/Prasanth_A)\
**Post date:** [May 8, 2025, 7:25am UTC](https://forum.inductiveautomation.com/t/log-project-creation-and-modification-timestamps-to-database-via-gateway-script/105955/13 "2025-05-08T07:25:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![hunterdg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/hunterdg/32/67774_2.png) [@hunterdg](https://forum.inductiveautomation.com/u/hunterdg)\
**Post date:** [May 8, 2025, 7:32am UTC](https://forum.inductiveautomation.com/t/log-project-creation-and-modification-timestamps-to-database-via-gateway-script/105955/14 "2025-05-08T07:32:10Z")

</div>

Query the table directly or `system.util.queryAuditLog`

> **[system.util.queryAuditLog | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-util/system-util-queryAuditLog)**
>
> Queries an audit profile for audit history.

Can also insert arbitrary records with [system.util.audit | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-util/system-util-audit)

---

<div class="post-metadata">

**Author:** ![hunterdg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/hunterdg/32/67774_2.png) [@hunterdg](https://forum.inductiveautomation.com/u/hunterdg)\
**Post date:** [May 8, 2025, 7:34am UTC](https://forum.inductiveautomation.com/t/log-project-creation-and-modification-timestamps-to-database-via-gateway-script/105955/15 "2025-05-08T07:34:53Z")

</div>

> **[Audit Log Displays | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/platform/audit-log-and-profiles/audit-log-display)**
>
> This page documents several ways to view results from the Audit Log System. For more information on how the Audit Log works, see the Audit Log and Profiles page.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/f/ff9ebc3fbee328519ceb8619751fe12caaa208eb.png)

---

<div class="post-metadata">

**Author:** ![Prasanth\_A](https://avatars.discourse-cdn.com/v4/letter/p/b38774/32.png) [@Prasanth\_A](https://forum.inductiveautomation.com/u/Prasanth_A)\
**Post date:** [May 8, 2025, 7:36am UTC](https://forum.inductiveautomation.com/t/log-project-creation-and-modification-timestamps-to-database-via-gateway-script/105955/16 "2025-05-08T07:36:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Prasanth\_A](https://avatars.discourse-cdn.com/v4/letter/p/b38774/32.png) [@Prasanth\_A](https://forum.inductiveautomation.com/u/Prasanth_A)\
**Post date:** [May 8, 2025, 7:48am UTC](https://forum.inductiveautomation.com/t/log-project-creation-and-modification-timestamps-to-database-via-gateway-script/105955/17 "2025-05-08T07:48:18Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/3/7307a7c87cf1978a4487018aa21b71b31b40d579.png)  
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.

---

<div class="post-metadata">

**Author:** ![hunterdg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/hunterdg/32/67774_2.png) [@hunterdg](https://forum.inductiveautomation.com/u/hunterdg)\
**Post date:** [May 8, 2025, 8:06am UTC](https://forum.inductiveautomation.com/t/log-project-creation-and-modification-timestamps-to-database-via-gateway-script/105955/18 "2025-05-08T08:06:20Z")

</div>

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

> **[Auditing Actions Reference | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/platform/audit-log-and-profiles/auditing-action-reference)**
>
> The auditing system in Ignition records actions originating from the Gateway, Perspective, and Vision projects. This page describes the actions logged by the auditing system.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/e/be4238e16e62a48430f07ca7563dbe2332d0426c.jpeg)

---

<div class="post-metadata">

**Author:** ![Prasanth\_A](https://avatars.discourse-cdn.com/v4/letter/p/b38774/32.png) [@Prasanth\_A](https://forum.inductiveautomation.com/u/Prasanth_A)\
**Post date:** [May 8, 2025, 11:53am UTC](https://forum.inductiveautomation.com/t/log-project-creation-and-modification-timestamps-to-database-via-gateway-script/105955/19 "2025-05-08T11:53:08Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/9/49d3b8f5faf92115b074ca98e4eef41ba7f6689f.png)

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?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 8, 2025, 12:33pm UTC](https://forum.inductiveautomation.com/t/log-project-creation-and-modification-timestamps-to-database-via-gateway-script/105955/20 "2025-05-08T12:33:16Z")

</div>

> [@Prasanth\_A](#):
>
> what is the difference

The former is for purely gateway-wide events. The latter is for project-specific events. 🤷‍♂️

[Next page](https://forum.inductiveautomation.com/t/log-project-creation-and-modification-timestamps-to-database-via-gateway-script/105955.md?page=2)
