#1 2012-12-12 11:25:30

corchi72
Member
Registered: 2010-12-10
Posts: 232

you can read the log in memory?without read from file .log

you can read the log of the framework without having to read from the file? How can I display it in a Grid.

so that I can read the log from a client

thanks

Last edited by corchi72 (2012-12-12 11:56:02)

Offline

#2 2012-12-12 11:58:30

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,660
Website

Re: you can read the log in memory?without read from file .log

The log is written in disk in small chunks, in order not to loose any logging data in case of an application crash, so does not reside in memory.

What you can do is just opening the log file from disk, using TSynLogFile class.
It will be very fast, and use memory-mapped files. Use a grid in virtual mode to display the content. See the LogViewer.dpr demo.
But you need to reload the file in order to refresh its content.

Offline

#3 2012-12-12 13:04:19

corchi72
Member
Registered: 2010-12-10
Posts: 232

Re: you can read the log in memory?without read from file .log

ok thanks

Offline

Board footer

Powered by FluxBB