23 #include <sys/types.h>
25 #include "ContainerId.h"
26 #include "IDobbyRdkLoggingPlugin.h"
27 #include <IDobbySettings.h>
28 #include "DobbyRdkPluginManager.h"
29 #include "DobbyLogRelay.h"
31 #include <rt_dobby_schema.h>
43 DobbyLogger(
const std::shared_ptr<const IDobbySettings> &settings);
50 std::shared_ptr<IDobbyRdkLoggingPlugin> loggingPlugin);
54 std::shared_ptr<IDobbyRdkLoggingPlugin> loggingPlugin);
57 int createDgramSocket(
const std::string &path);
68 const std::string mSocketPath;
69 const std::string mSyslogSocketPath;
70 const std::string mJournaldSocketPath;
73 std::map<pid_t, int> mTempFds;
75 std::shared_ptr<AICommon::PollLoop> mPollLoop;
77 std::shared_ptr<DobbyLogRelay> mSyslogRelay;
78 std::shared_ptr<DobbyLogRelay> mJournaldRelay;
Definition: DobbyLogger.h:41
bool DumpBuffer(int bufferMemFd, pid_t containerPid, std::shared_ptr< IDobbyRdkLoggingPlugin > loggingPlugin)
Blocking method that writes the contents of a buffer at a given memFd to the logger specified in the ...
Definition: DobbyLogger.cpp:383
int createUnixSocket(const std::string path)
Create a new UNIX domain socket that the OCI runtime can connect to and send the fd of the ptty used ...
Definition: DobbyLogger.cpp:125
bool StartContainerLogging(std::string containerId, pid_t runtimePid, pid_t containerPid, std::shared_ptr< IDobbyRdkLoggingPlugin > loggingPlugin)
Public method that should be called once a container has been created to match the container PID with...
Definition: DobbyLogger.cpp:337
int receiveFdFromSocket(const int connectionFd)
Once a connection to the socket has been made, wait to receive a message that contains a file descrip...
Definition: DobbyLogger.cpp:179
void closeAndDeleteSocket(const int fd, const std::string &path)
Closes and deletes a socket at a given fd/path.
Definition: DobbyLogger.cpp:414
void connectionMonitorThread(const int socketFd)
Runs for the lifetime of the daemon, waiting for new connections to the socket. Once a connection is ...
Definition: DobbyLogger.cpp:243