IdServerInterceptLogEvent.pas 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. {
  2. $Project$
  3. $Workfile$
  4. $Revision$
  5. $DateUTC$
  6. $Id$
  7. This file is part of the Indy (Internet Direct) project, and is offered
  8. under the dual-licensing agreement described on the Indy website.
  9. (http://www.indyproject.org/)
  10. Copyright:
  11. (c) 1993-2005, Chad Z. Hower and the Indy Pit Crew. All rights reserved.
  12. }
  13. {
  14. $Log$
  15. }
  16. {
  17. Rev 1.1 10/17/2003 6:24:58 PM BGooijen
  18. Removed const
  19. Rev 1.0 3/22/2003 11:06:06 PM BGooijen
  20. Initial check in.
  21. ServerIntercept to log data/status to an event.
  22. }
  23. unit IdServerInterceptLogEvent;
  24. interface
  25. {$i IdCompilerDefines.inc}
  26. uses
  27. IdServerInterceptLogBase;
  28. type
  29. TIdServerInterceptLogEvent=class;
  30. TIdOnLogString= procedure(ASender: TIdServerInterceptLogEvent; const AText: string) of object;
  31. TIdServerInterceptLogEvent = class(TIdServerInterceptLogBase)
  32. protected
  33. FOnLogString: TIdOnLogString;
  34. public
  35. procedure DoLogWriteString(const AText: string); override;
  36. published
  37. property OnLogString: TIdOnLogString read FOnLogString write FOnLogString;
  38. end;
  39. implementation
  40. { TIdServerInterceptLogEvent }
  41. procedure TIdServerInterceptLogEvent.DoLogWriteString(const AText: string);
  42. begin
  43. if Assigned(FOnLogString) then begin
  44. FOnLogString(Self, AText);
  45. end;
  46. end;
  47. end.