danieleteti / loggerpro

An modern and pluggable logging framework for Delphi
Apache License 2.0
353 stars 91 forks source link

There seems to be no info about supported Delphi versions #4

Closed Kromster80 closed 8 years ago

Kromster80 commented 8 years ago

There seems to be no info about supported Delphi versions on the main page or readme.md.

I tried compiling the code in Delphi XE2 and failed:

if FLogsFolder.IsEmpty then // <<-- this line fails in XE2

[DCC Error] LoggerPro.FileAppender.pas(126): E2018 Record, object or class type required [DCC Fatal Error] LoggerPro.pas(230): F2063 Could not compile used unit 'LoggerPro.FileAppender.pas'

danieleteti commented 8 years ago

I dont have XE2 anymore. Try to change it in if FLogsFolder = '' then and see what happens.

Kromster80 commented 8 years ago

Sure, that helps (in this and several more places) and LoggerPro starts to work under Delphi XE2.

I see one or two things to do now

danieleteti commented 8 years ago

Ok, I'll change the "String.IsEmpty" in " = '' "

Kromster80 commented 8 years ago

Also line 324 in LoggerPro.pas

if TObject(FLogAppenders[I]).ClassName.Equals(AppenderName) then

to

if SameText(TObject(FLogAppenders[I]).ClassName, AppenderName) then

Sorry I could not make a pull request at the time. These 2 changes are enough to make it work in XE2.

P.S. Thank you for quick response!

danieleteti commented 8 years ago

All the changes have been included in the new RC5 build. Update the repo and test it please.

Kromster80 commented 8 years ago

Seems to work well now. Thanks!