# Logging Admin activity to a log file

**URL:** <https://community.glideapps.com/t/logging-admin-activity-to-a-log-file/61156>\
**Category:** Ask for Help\
**Created:** [April 29, 2023, 8:13am UTC](https://community.glideapps.com/t/logging-admin-activity-to-a-log-file/61156 "2023-04-29T08:13:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![snooprussyruss](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@snooprussyruss](https://community.glideapps.com/u/snooprussyruss)\
**Post date:** [April 29, 2023, 8:13am UTC](https://community.glideapps.com/t/logging-admin-activity-to-a-log-file/61156/1 "2023-04-29T08:13:04Z")

</div>

Hi team,

Wondering if anyone has had a need for what I am about to describe - and if so - how they solved it.

I have developed a membership based app that is largely “view only” except for a designated admin who can add, edit and delete membership records.

The organisation I have developed this app for has now asked for audit logs that enable them to see what records have been added, edited or deleted - and what those changes actually were. Their interest is motivated by this info sometimes being needed for court cases - where a chain of evidence may be inportant.

Ideally - the log would show one row of data per add, change or delete - with a date/time stamp.

Conscious as well that any sort of log could eat up ‘updates’ super quickly.

Any thoughts or suggestions gratefully received.

Regards,

Russ

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [April 29, 2023, 9:16am UTC](https://community.glideapps.com/t/logging-admin-activity-to-a-log-file/61156/2 "2023-04-29T09:16:52Z")

</div>

Yeah I’ve done this, using JSON and JavaScript.  
I was able to successfully store/view up to 1000 or more log events in a single JSON string. So for example, if you have a table with 1000 items, you could store 1000 log events per item (1 million log events in total) without using any additional rows. (that’s strictly not true, because you’d need a 1000 row helper table to view the logs - so 2000 rows in total to get 1 million rows of logs).  
I won’t attempt to explain how it’s done, because it’s complicated.

But you can see an example below:

> **[Audit Log - JS](https://go.glideapps.com/template/9vamvfoci2Cv3CDYUToJ-template-published?privateTemplateToken=9IPqFFUwy39CD4P7Usms)**

---

<div class="post-metadata">

**Author:** ![snooprussyruss](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@snooprussyruss](https://community.glideapps.com/u/snooprussyruss)\
**Post date:** [April 30, 2023, 3:34am UTC](https://community.glideapps.com/t/logging-admin-activity-to-a-log-file/61156/3 "2023-04-30T03:34:20Z")

</div>

Hi Darren,

Thanks for the speedy reply. It is reassuring to know it can be done.

If the customer insists that they want this I will come back to you and see if you have time to develop it for me. Is there much work involved in implementing your solution? 2 hours? 50 hours? 100 hours?

Thanks again.

Russ

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [April 30, 2023, 3:36am UTC](https://community.glideapps.com/t/logging-admin-activity-to-a-log-file/61156/4 "2023-04-30T03:36:18Z")

</div>

I’ll reply in PM.
