#1 Re: Source Code repository » Enhanced Log Viewer » 2013-03-07 02:01:07

Cool, thanks for that. Happy to have made a useful suggestion too smile

#2 Re: Source Code repository » Enhanced Log Viewer » 2013-02-26 22:36:07

ab wrote:

But log file autorotation is certainly the best answer to your problem.
It is on the roadmap - see http://synopse.info/fossil/tktview?name=72feb66d45

Yeah, that sounds excellent. I can't wait smile

Also, at the risk of sounding like someone too lazy to RTFM about submitting code, I added a popup menu to the List with a "copy" item on it, so I can copy the currently visible rows out of the list. The code follows in case you are willing to add it to the project.

procedure TMainLogView.ListMenuCopyClick(Sender: TObject);
var s:string;
    i,Index:integer;
begin
  // based on ListDrawCell
  s := '';
  for i := 0 to FLogSelectedCount-1 do
  begin
    Index := FLogSelected[i];
    s := s + TimeToStr(FLog.EventDateTime(Index)) + #9
           + FEventCaption[FLog.EventLevel[Index]] + #9;
    if FLog.EventThread<>nil then
      s := s + IntToString(cardinal(FLog.EventThread[Index])) else
      s := s + UTF8ToString(StringReplaceAll(FLog.EventText[Index],#9,'   '));
    s := s + UTF8ToString(StringReplaceAll(FLog.EventText[Index],#9,'   ')) + sLineBreak;
  end;
  Clipboard.AsText := s;
end;

#3 Re: Source Code repository » Enhanced Log Viewer » 2013-02-26 00:21:11

Is the file size limit necessary? I have a 4.7GB log file that won't open, but if I make a copy of the first 50MB of it that opens fine despite the last line being truncated arbitrarily. A 1.4GB file also will not open (that is, it shows in the list of files but clicking on it leaves the view area blank). If I grab the first 1GB of the file it loads and I can click "merge method calls". which is what I want.

Tracing into LogViewer when it tries to load that file it is trying to open it as text but not displaying anything.

    if FLog.EventLevel=nil then begin // if not a TSynLog file -> open as plain text

That line is going the "not a log file" path.

Can this be fixed (obviously at the cost of log file parsing taking a very long time)?

I'm using SynLogging as a cheap profiler and for what I'm doing I'd rather be able to see time breakdowns for the whole operation I'm profiling if I can. Unfortunately for the code I'm working on the way the input grows is through increased complexity rather than just more repetitions of the same basic data. (viz, we know the processing cost is O(A*B*C*D*E*F*G), where all those factors are increasing at similar rates, but we don't know exactly where the time goes as they grow - the exponents on each factor).


(I've also had to build LogViewer to avoid the AV on start - the zipped exe seems to be broken. Also, for other readers, the project is in "SQLite3\Samples\11 - Exception logging" within the main source zip file).

Board footer

Powered by FluxBB