FIX: Compiling with Lazarus trunk.

This commit is contained in:
cobines 2012-03-08 01:31:20 +00:00
commit 71c8131c8d

View file

@ -51,7 +51,7 @@ implementation
uses
LCLProc, syncobjs
{$IF lcl_fullversion >= 093100}
, LazLogger
, LazLogger, LazLoggerBase, LazClasses
{$ENDIF}
;
@ -60,7 +60,7 @@ type
{en
Logger with thread-safe DebugLn and DbgOut.
}
TDCLogger = class(TLazLogger)
TDCLogger = class(TLazLoggerFile)
private
DebugLnLock: TCriticalSection;
protected
@ -74,6 +74,12 @@ type
var
DCLogger: TDCLogger;
function CreateDCLogger: TRefCountedObject;
begin
Result := TDCLogger.Create;
TDCLogger(Result).Assign(GetExistingDebugLogger);
end;
{ TDCLogger }
procedure TDCLogger.DoDbgOut(const s: string);
@ -236,17 +242,16 @@ end;
initialization
{$IF lcl_fullversion >= 093100}
DCLogger := TDCLogger.Create;
LazLogger.SetDebugLogger(DCLogger);
LazDebugLoggerCreator := @CreateDCLogger;
RecreateDebugLogger;
{$ELSE}
DebugLnLock := TCriticalSection.Create;
{$ENDIF}
{$IF lcl_fullversion < 093100}
finalization
{$IF lcl_fullversion >= 093100}
{$ELSE}
DebugLnLock.Free;
{$ENDIF}
{$ENDIF}
end.