13 #ifndef __PROCESS_LOGGING_HPP__
14 #define __PROCESS_LOGGING_HPP__
16 #include <glog/logging.h>
31 authenticationRealm(_authenticationRealm)
37 CHECK(
sizeof(FLAGS_v) ==
sizeof(int32_t));
47 if (authenticationRealm.
isSome()) {
48 route(
"/toggle", authenticationRealm.
get(), TOGGLE_HELP(), &This::toggle);
53 return This::toggle(request,
None());
66 VLOG(FLAGS_v) <<
"Setting verbose logging level to " << v;
85 static const std::string TOGGLE_HELP();
89 const int32_t original;
98 #endif // __PROCESS_LOGGING_HPP__
virtual void initialize()
Invoked when a process gets spawned.
Definition: logging.hpp:45
Future< Response > request(const Request &request, bool streamedResponse=false)
Asynchronously sends an HTTP request to the process and returns the HTTP response once the entire res...
Logging(Option< std::string > _authenticationRealm)
Definition: logging.hpp:28
Definition: process.hpp:72
void route(const std::string &name, const Option< std::string > &help, const HttpRequestHandler &handler, const RouteOptions &options=RouteOptions())
Sets up a handler for HTTP requests with the specified name.
Definition: duration.hpp:32
bool isSome() const
Definition: option.hpp:115
Definition: logging.hpp:25
Definition: duration.hpp:259
const T & get() const &
Definition: option.hpp:118
Result< Process > process(pid_t pid)
Definition: freebsd.hpp:30
Future< Nothing > set_level(int level, const Duration &duration)
Definition: process.hpp:493
virtual ~Logging()
Definition: logging.hpp:40
Duration remaining() const
Definition: timeout.hpp:77