felog.inc 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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.1 2003-02-19 20:25:16 michael
  48. + Added event log
  49. }