Join 34,000+ subscribers and receive articles from our
blog about software quality, testing, QA and security.

Retrieving list of N recent log entries


Is it possible to get list of some recent log entries within the code. I found that it could be useful in automatic notification of problems; If I encounter a problem within a code, I could add a list of 10-20 last log messages to notification message. That could be good hint for maintenance.

best regards
Piotr Rezmer


Hello Piotr,

If I understood you correctly, there’s a feature of the protocols named `backlog’ which does exactly what you are trying to do. The feature is a bit complex, so we have an article in our article section which explains it in detail (the article is a bit out of date; the protocol options are named a bit different in newer releases, but the old options are still supported):

Exploring the Backlog Functionality of the SmartInspect Libraries