PacketConsoleLogger.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * Copyright (c) 2014, Oculus VR, Inc.
  3. * All rights reserved.
  4. *
  5. * This source code is licensed under the BSD-style license found in the
  6. * LICENSE file in the root directory of this source tree. An additional grant
  7. * of patent rights can be found in the PATENTS file in the same directory.
  8. *
  9. */
  10. /// \file
  11. /// \brief This will write all incoming and outgoing network messages to the log command parser, which can be accessed through Telnet
  12. ///
  13. #include "NativeFeatureIncludes.h"
  14. #if _RAKNET_SUPPORT_LogCommandParser==1 && _RAKNET_SUPPORT_PacketLogger==1
  15. #ifndef __PACKET_CONSOLE_LOGGER_H_
  16. #define __PACKET_CONSOLE_LOGGER_H_
  17. #include "PacketLogger.h"
  18. namespace RakNet
  19. {
  20. /// Forward declarations
  21. class LogCommandParser;
  22. /// \ingroup PACKETLOGGER_GROUP
  23. /// \brief Packetlogger that logs to a remote command console
  24. class RAK_DLL_EXPORT PacketConsoleLogger : public PacketLogger
  25. {
  26. public:
  27. PacketConsoleLogger();
  28. // Writes to the command parser used for logging, which is accessed through a secondary communication layer (such as Telnet or RakNet) - See ConsoleServer.h
  29. virtual void SetLogCommandParser(LogCommandParser *lcp);
  30. virtual void WriteLog(const char *str);
  31. protected:
  32. LogCommandParser *logCommandParser;
  33. };
  34. } // namespace RakNet
  35. #endif
  36. #endif // _RAKNET_SUPPORT_*
粤ICP备19079148号