23 #ifndef ETHANLOGPLUGIN_H
24 #define ETHANLOGPLUGIN_H
26 #include <IDobbyPlugin.h>
27 #include <PluginBase.h>
52 const std::shared_ptr<IDobbyUtils>& utils);
56 std::string
name()
const final;
62 const std::shared_ptr<IDobbyStartState>& startupState,
63 const std::string& rootfsPath,
64 const Json::Value& jsonData)
final;
68 const std::string& rootfsPath,
69 const Json::Value& jsonData)
final;
75 const std::string mName;
76 const std::shared_ptr<IDobbyUtils> mUtilities;
77 const std::shared_ptr<EthanLogLoop> mLogLoop;
80 const unsigned mDefaultLogLevelsMask;
A wrapper around a std::string, used to add some type definition to to an id and also to sanity check...
Definition: ContainerId.h:41
Definition: EthanLogLoop.h:46
Plugin library that create a DIAG logging pipe for a container.
Definition: EthanLogPlugin.h:49
bool preStart(const ContainerId &id, pid_t pid, const std::string &rootfsPath, const Json::Value &jsonData) final
We hook the preStart point so we can tell the EthanLog code the base pid of the container.
Definition: EthanLogPlugin.cpp:276
unsigned parseLogLevels(const Json::Value &jsonArray) const
Parses the supplied json array and returns a bitmask of the log levels.
Definition: EthanLogPlugin.cpp:307
std::string name() const final
Boilerplate that just returns the name of the hook.
Definition: EthanLogPlugin.cpp:115
unsigned hookHints() const final
Indicates which hook points we want and whether to run the asynchronously or synchronously with the o...
Definition: EthanLogPlugin.cpp:128
bool postConstruction(const ContainerId &id, const std::shared_ptr< IDobbyStartState > &startupState, const std::string &rootfsPath, const Json::Value &jsonData) final
We hook the postConstruction point to create a logging pipe for the container which we then given to ...
Definition: EthanLogPlugin.cpp:155
Basic object that provides the default overrides for a plugin.
Definition: PluginBase.h:38