Menu

#3 Show logfile on app exit?

open
None
5
2008-08-19
2006-06-18
Chris
No

hi

I miss the possibility to show the log file on app exit.
So I changed the source

Find this line in FastMM4.pas
MessageBox(0, LLeakMessage, LMessageTitleBuffer,
MB_OK or MB_ICONERROR or MB_TASKMODAL);
{$endif}

and add this :

{$ifndef Linux}
{$IFDEF ShowLogFileOnAppEnd}
{$ifdef FullDebugMode}

ShellExecute(0,'open',LogOpenEditor,MMLogFileName,'',
Windows.SW_SHOW);
{$ENDIF}
{$ENDIF}
{$ENDIF}

You also have to add ShellApi to implementation uses
clause :

{$ifndef Linux}
Windows,
ShellApi,
{$else}
Libc,
{$endif}

At the end add a global variable to interface section
of FastMM4.pas

var
LogOpenEditor : PCHAR = 'notepad.exe';

You can change the editor to your favorite one.

Eventually you must define this compiler directives
anywhere (or in compiler options)

ShowLogFileOnAppEnd;LogErrorsToFile;FullDebugMode;ManualLeakReportingControl

Maybe this request could be added to next version?
Unfortunately this does not work in Linuxmode, yet.

greets
Dezipaitor

P.S.
I added the changed FastMM4 file for testing.

Discussion

  • Chris

    Chris - 2006-06-18

    FastMM4 Ver466 show log file

     
  • Nobody/Anonymous

    Logged In: NO

    Hi Chris,

    Thanks for the suggestion. I will keep it in mind for the
    next version.

    Regards,
    Pierre

     
  • Chris

    Chris - 2008-08-19

    Logged In: YES
    user_id=707179
    Originator: YES

    I just downloaded the 4.88 version and could not find any feature that brings up an default editor for showing a leak report. Did you forget it?

     
  • Chris

    Chris - 2008-08-19
    • assigned_to: nobody --> pierre_le_riche
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.