#1 2014-05-26 05:41:28

edwinsn
Member
Registered: 2010-07-02
Posts: 1,218

Control the filename & the instantiation of the TSynLog

Hi Arnaud,

The way (so called per-family) the TSynLog class works is somehow confusing, and that way is not suitable in some cases. Is there a way to control the target file name and the instantiation of a TSynLog object?

What I want is something like this:

var
  myLog: TSynLog;
begin
  myLog := TSynLog.Create();
  myLog.FileName := 'my log file for this operation at this time';
  myLog.Log(sllInfo, 'starting...');
  //...
  myLog.Release;

Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

#2 2014-05-26 07:02:26

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

Re: Control the filename & the instantiation of the TSynLog

Sounds like this feature request:
http://synopse.info/fossil/tktview?name=d3f5197f3c

Offline

#3 2014-05-26 07:27:39

edwinsn
Member
Registered: 2010-07-02
Posts: 1,218

Re: Control the filename & the instantiation of the TSynLog

Yes. For now until you are adding any new additions to the logging library, looks like I can override TSynLog.CreateLogWriter() to archive what I need...


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

Board footer

Powered by FluxBB