# Logging

**URL:** <https://forum.inductiveautomation.com/t/logging/4425>\
**Category:** Ignition\
**Created:** [May 8, 2012, 1:34pm UTC](https://forum.inductiveautomation.com/t/logging/4425 "2012-05-08T13:34:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mcarangelo](https://avatars.discourse-cdn.com/v4/letter/m/9de053/32.png) [@mcarangelo](https://forum.inductiveautomation.com/u/mcarangelo)\
**Post date:** [May 8, 2012, 1:34pm UTC](https://forum.inductiveautomation.com/t/logging/4425/1 "2012-05-08T13:34:27Z")

</div>

We need to have a window on our clients that displays a running list of log messages that originate on the gateway. We only need to buffer about 100 messages and make them available to the client on a real-time basis. Is there a straightforward way to do this? What display tool is most suited for this?

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [May 8, 2012, 5:48pm UTC](https://forum.inductiveautomation.com/t/logging/4425/2 "2012-05-08T17:48:40Z")

</div>

This should be very simple using a database table. Simply have a two-column table: timestamp and message. To add a message do an INSERT query using the current time. To get the last 100 messages simply do a SELECT query ordering by timestamp and doing a LIMIT 100 or TOP 100 depending on the database you’re using.

If you’re worried about the database filling up, write a gateway timer script that periodically prunes the table doing a DELETE where the timestamp is older than the oldest record of the LIMIT 100 query.
