22#include "ILoggingSink.h"
27 FileSink(
const std::string &containerId, std::shared_ptr<rt_dobby_schema> &containerConfig);
32 void DumpLog(
const int bufferFd)
override;
34 void process(
const std::shared_ptr<AICommon::IPollLoop> &pollLoop, epoll_event event)
override;
37 int openFile(
const std::string& pathName);
40 const std::shared_ptr<rt_dobby_schema> mContainerConfig;
41 const std::string mContainerId;
43 ssize_t mFileSizeLimit;
44 std::string mOutputFilePath;
49 char mBuf[PTY_BUFFER_SIZE];
void DumpLog(const int bufferFd) override
Reads all the available data from the provided fd and writes it to the output file....
Definition FileSink.cpp:114
int openFile(const std::string &pathName)
Opens the log file at a given path. Will create a new file when called, and subsequent writes will ap...
Definition FileSink.cpp:245
void process(const std::shared_ptr< AICommon::IPollLoop > &pollLoop, epoll_event event) override
Called by the pollLoop when an event occurs on the container ptty.
Definition FileSink.cpp:171
Definition ILoggingSink.h:29