felog.inc 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 2003 by the Free Pascal development team
  4. Generic implementation of 'system log' event mechanism which maps to file log.
  5. See the file COPYING.FPC, included in this distribution,
  6. for details about the copyright.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. **********************************************************************}
  11. Function TEventLog.DefaultFileName : String;
  12. begin
  13. Result:=ChangeFileExt(ExtractFileName(Paramstr(0)),'.log');
  14. end;
  15. Procedure TEventLog.ActivateSystemLog;
  16. begin
  17. CheckIdentification;
  18. ActivateFileLog;
  19. end;
  20. Procedure TEventLog.DeActivateSystemLog;
  21. begin
  22. DeActivateFileLog;
  23. end;
  24. procedure TEventLog.WriteSystemLog(EventType : TEventType; Msg : String);
  25. begin
  26. WriteFileLog(EventType,Msg);
  27. end;
  28. Function TEventLog.RegisterMessageFile(AFileName : String) : Boolean;
  29. begin
  30. Result:=True;
  31. end;
  32. function TEventLog.MapTypeToCategory(EventType: TEventType): Word;
  33. begin
  34. Result:=0;
  35. end;
  36. function TEventLog.MapTypeToEventID(EventType: TEventType): DWord;
  37. begin
  38. Result:=0;
  39. end;
  40. function TEventLog.MapTypeToEvent(EventType: TEventType): DWord;
  41. begin
  42. Result:=0;
  43. end;