CodeSite日期记录对于调试程序而言非常方便,我们可以同时开启动态日志监视和文件日志:
var
Dest: TCodeSiteDestination;
begin
Dest := TCodeSiteDestination.Create( Self );
//开启文件日志
Dest.LogFile.Active := True;
Dest.LogFile.FileName := 'MyFirstLog.csl';
Dest.LogFile.FilePath := '$(MyDocs)';
//开启动态日志监视
Dest.Viewer.Active := True; // Add this line
CodeSite.Destination := Dest;