Jpp  17.3.0-rc.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JControlHostLogger.hh
Go to the documentation of this file.
1 #ifndef __JLOGGER__JCONTROLHOSTLOGGER__
2 #define __JLOGGER__JCONTROLHOSTLOGGER__
3 
4 #include <string>
5 
6 #include "JNet/JControlHost.hh"
7 #include "JLogger/JLogger.hh"
8 
9 
10 /**
11  * \author mdejong
12  */
13 
14 namespace JLOGGER {}
15 namespace JPP { using namespace JLOGGER; }
16 
17 namespace JLOGGER {
18 
19  using JNET::JControlHost;
20 
21 
22  /**
23  * Message logging based on ControlHost.
24  * This class implements the JLogger interface.
25  */
27  public JLogger,
28  protected JControlHost
29  {
30  public:
31  /**
32  * Constructor.
33  *
34  * \param host_name host name
35  */
36  JControlHostLogger(std::string const& host_name) :
37  JControlHost(host_name)
38  {}
39 
40 
41  /**
42  * Report message
43  *
44  * \param tag tag
45  * \param message message
46  */
47  virtual void typeout(const std::string& tag,
48  const std::string& message)
49  {
50  this->PutFullString(tag, message);
51  }
52  };
53 }
54 
55 #endif
ControlHost class.
Interface for logging messages.
Definition: JLogger.hh:22
Message logging based on ControlHost.
then awk string
virtual void typeout(const std::string &tag, const std::string &message)
Report message.
JControlHostLogger(std::string const &host_name)
Constructor.
int PutFullString(const JTag &tag, const std::string &buffer)
Send string.