OSSIA
Open Scenario System for Interactive Application
network_logger.hpp
1 #pragma once
2 #include <ossia/detail/config.hpp>
3 
4 #include <ossia/detail/logger_fwd.hpp>
5 
6 #include <memory>
7 namespace spdlog
8 {
9 // Use it by doing : #include <ossia/detail/logger.hpp>
10 class logger;
11 }
12 
13 namespace ossia
14 {
15 namespace net
16 {
18 class OSSIA_EXPORT network_logger
19 {
20 public:
22  ~network_logger();
23 
25  std::shared_ptr<ossia::logger_type> i, std::shared_ptr<ossia::logger_type> o)
26  : inbound_logger{std::move(i)}
27  , outbound_logger{std::move(o)}
28  {
29  }
30 
35  std::shared_ptr<ossia::logger_type> inbound_logger;
36 
40  std::shared_ptr<ossia::logger_type> outbound_logger;
41 
42  // Same but will only be active for parameters that are listened to.
43  std::shared_ptr<ossia::logger_type> inbound_listened_logger;
44  std::shared_ptr<ossia::logger_type> outbound_listened_logger;
45 };
46 }
47 }
Stores custom loggers for the inbound and outbound network messages.
Definition: network_logger.hpp:19
std::shared_ptr< ossia::logger_type > outbound_logger
outbound_logger Set log function for messages going outside.
Definition: network_logger.hpp:40
std::shared_ptr< ossia::logger_type > inbound_logger
inbound_logger Set log function for messages coming from outside.
Definition: network_logger.hpp:35
Definition: git_info.h:7
spdlog::logger & logger() noexcept
Where the errors will be logged. Default is stderr.
Definition: context.cpp:104