You are not logged in.
Pages: 1
Hi, Delphi2009ent
1. Is it possible to set maximum file size and maximum rotating files (if any) ?
I had a problem that log file got over 80G :rolleyes.
We need that logging be able to limit itself:
a. maximum logfile size
b. possible to have rotating logfiles ?
2. It would be nice to have possibility to have same logfilename without time.
3. We want to add console in GUI application but we saw the StdOut in initialized in initialisation section.
We create Console woth AlloCConsole and FreeConsole.
For Now we just put RetrieveSystemInfo in Interface for now.
4. (newest version): we have problem with Logview viewing files when debugged (all lines are white). In Run mode works ok.
5. some kind of general function that would run LogView with latest logfile ? that would be nice
thank you,
Vojko Cendak
Last edited by VojkoCendak (2013-02-06 12:21:09)
Offline
Very good ideas.
Could you create some tickets, as Feature Requests, in http://synopse.info/fossil/reportlist ?
(you just need to log to fossil as anonymous)
Offline
I've created the ticket.
Add optional log file rotation of several logs (with optional compression/deletion of older files) to the TSynLog family properties.
The log file name may therefore be fixed, and new explicit "start/stop application" events shall be added, to quickly goBy design, only one process would attempt to the same set of rotated files.
And all threads shall be logged within the same log file (no one file per thread feature in rotate mode).TSynLogFamily may threfore be changed to use an enumeration instead of some boolean properties.
Files may be prepared, i.e. filled with spaces, to enhance writing speed (nice to have - only if worth it).
Offline
TextColor() and TextBackground() will now initialize internal console process after any manual AllocConsole call
See http://synopse.info/fossil/info/b0f13e36a1
So you can just write:
// manual switch to console mode
AllocConsole;
TextColor(ccLightGray);
See also the new procedure ConsoleWaitForEnterKey.
Offline
We have introduced TSynLogFamily.RotateFileCount and RotateFileSizeKB properties, to enable log file rotation and SynLZ compression.
Log file rotation is as easy as:
with TSQLLog.Family do begin
Level := LOG_VERBOSE;
RotateFileCount := 5;
RotateFileSizeKB := 20*1024; // rotate by 20 MB logs
end;
Note that in this case, PerThreadLog and HighResolutionTimeStamp properties will be ignored, since both features expect a single process to run.
See http://synopse.info/fossil/info/c26f17286d
And do not forget to re-compile the Log Viewer tool from the latest sources, or retrieve the today's compiled version (compiled with Delphi 2007) from http://synopse.info/files/LogView.zip
Offline
Pages: 1