Apache Mesos
Public Member Functions | Protected Attributes | List of all members
mesos::internal::logger::LogrotateContainerLogger Class Reference

#include <lib_logrotate.hpp>

Inheritance diagram for mesos::internal::logger::LogrotateContainerLogger:

Public Member Functions

 LogrotateContainerLogger (const Flags &_flags)
virtual ~LogrotateContainerLogger ()
virtual Try< Nothinginitialize ()
 Initializes this container logger. More...
virtual process::Future
< mesos::slave::ContainerIO
prepare (const ExecutorInfo &executorInfo, const std::string &sandboxDirectory, const Option< std::string > &user)
 Called before Mesos creates a container. More...
- Public Member Functions inherited from mesos::slave::ContainerLogger
virtual ~ContainerLogger ()

Protected Attributes

Flags flags
< LogrotateContainerLoggerProcess > 

Additional Inherited Members

- Static Public Member Functions inherited from mesos::slave::ContainerLogger
static Try< ContainerLogger * > create (const Option< std::string > &type)
 Create and initialize a container logger instance of the given type, specified by the container_logger agent flag. More...

Constructor & Destructor Documentation

mesos::internal::logger::LogrotateContainerLogger::LogrotateContainerLogger ( const Flags _flags)
virtual mesos::internal::logger::LogrotateContainerLogger::~LogrotateContainerLogger ( )

Member Function Documentation

virtual Try<Nothing> mesos::internal::logger::LogrotateContainerLogger::initialize ( )

Initializes this container logger.

This method must be called before any other member function is called.

The container logger module should return an error if the particular module is not supported. For example, if the module implements log rotation via the logrotate utility, the module can return an error if the utility is not found.

Implements mesos::slave::ContainerLogger.

virtual process::Future<mesos::slave::ContainerIO> mesos::internal::logger::LogrotateContainerLogger::prepare ( const ExecutorInfo &  executorInfo,
const std::string &  sandboxDirectory,
const Option< std::string > &  user 

Called before Mesos creates a container.

The container logger is given some of the arguments which the containerizer will use to launch a container. The container logger should return a ContainerIO which tells the containerizer how to handle the stdout and stderr of the container. The container logger can modify the fields within the ContainerIO as much as necessary, with some exceptions; see the struct ContainerIO above.

NOTE: The container logger should not lose stdout/stderr if the agent fails over. Additionally, if the container logger is stateful, the logger should be capable of recovering managed executors during the agent recovery process. See ContainerLogger::recover.

executorInfoProvided for the container logger to track logs.
sandboxDirectoryAn absolute path to the executor's sandbox. This is provided in case the container logger needs to store files in the executor's sandbox, such as persistent state between agent failovers. NOTE: All files in the sandbox are exposed via the /files endpoint.

Implements mesos::slave::ContainerLogger.

Member Data Documentation

Flags mesos::internal::logger::LogrotateContainerLogger::flags
process::Owned<LogrotateContainerLoggerProcess> mesos::internal::logger::LogrotateContainerLogger::process

The documentation for this class was generated from the following file: