felog.inc 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 2003 by the Free Pascal development team
  5. Generic implementation of 'system log' event mechanism which maps to file log.
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************}
  12. Function TEventLog.DefaultFileName : String;
  13. begin
  14. Result:=ChangeFileExt(ExtractFileName(Paramstr(0)),'.log');
  15. end;
  16. Procedure TEventLog.ActivateSystemLog;
  17. begin
  18. CheckIdentification;
  19. ActivateFileLog;
  20. end;
  21. Procedure TEventLog.DeActivateSystemLog;
  22. begin
  23. DeActivateFileLog;
  24. end;
  25. procedure TEventLog.WriteSystemLog(EventType : TEventType; Msg : String);
  26. begin
  27. WriteFileLog(EventType,Msg);
  28. end;
  29. Function TEventLog.RegisterMessageFile(AFileName : String) : Boolean;
  30. begin
  31. Result:=True;
  32. end;
  33. function TEventLog.MapTypeToCategory(EventType: TEventType): Word;
  34. begin
  35. Result:=0;
  36. end;
  37. function TEventLog.MapTypeToEventID(EventType: TEventType): DWord;
  38. begin
  39. Result:=0;
  40. end;
  41. function TEventLog.MapTypeToEvent(EventType: TEventType): DWord;
  42. begin
  43. Result:=0;
  44. end;
  45. {
  46. $Log$
  47. Revision 1.3 2003-10-09 15:53:21 peter
  48. * moved
  49. Revision 1.1 2003/10/06 20:33:58 peter
  50. * classes moved to rtl for 1.1
  51. * classes .inc and classes.pp files moved to fcl/classes for
  52. backwards 1.0.x compatiblity to have it in the fcl
  53. Revision 1.1 2003/02/19 20:25:16 michael
  54. + Added event log
  55. }