Logging

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?

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.