Recent

Author Topic: prevent lcldebug.log  (Read 2728 times)

LA.Center

  • Full Member
  • ***
  • Posts: 244
    • LA.Center
prevent lcldebug.log
« on: April 25, 2012, 01:14:08 pm »
How can I disable the generation of lcldebug.log on WinCE development. I have a couple of silent exceptions and I don't want lcldebug.log.

Does anyone know?

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 5691
    • wiki
Re: prevent lcldebug.log
« Reply #1 on: April 25, 2012, 01:54:19 pm »
Which version of lazarus?

The code was changed in 0.9.31, but from review it appears, wince always had the issue. Other widgetsets use standard out, or drop the log, if there is no stdout.

Anyway, the real issue is to find, where "DebugLn" is called. This should probably not be called.

Before 0.9.31 finding and removing the call to debugln, is the only way I know.

With current 0.9.31, you can:

uses LazLoggerBase;

DebugLogger := TLazLoggerNoOutput.Create;



felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3541
Re: prevent lcldebug.log
« Reply #2 on: April 25, 2012, 01:58:18 pm »
Well, in any version you can always modify the lazarus sources and hard code to not generate any file, even in legitimate crashes. After your changes the WinCE code is located in lazarussvn\components\lazutils\lazlogger.pas

For older Lazarus just search for the string "lcldebug.log" in lazarus/lcl

But indeed Martin, changing the DebugLogger is a nice new way.