MCPcopy Create free account
hub / github.com/apache/mesos / setLoggingLevel

Method setLoggingLevel

src/master/http.cpp:1670–1694  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1668
1669
1670Future<Response> Master::Http::setLoggingLevel(
1671 const mesos::master::Call& call,
1672 const Option<Principal>& principal,
1673 ContentType /*contentType*/) const
1674{
1675 CHECK_EQ(mesos::master::Call::SET_LOGGING_LEVEL, call.type());
1676 CHECK(call.has_set_logging_level());
1677
1678 uint32_t level = call.set_logging_level().level();
1679 Duration duration =
1680 Nanoseconds(call.set_logging_level().duration().nanoseconds());
1681
1682 return ObjectApprovers::create(master->authorizer, principal, {SET_LOG_LEVEL})
1683 .then([level, duration](const Owned<ObjectApprovers>& approvers)
1684 -> Future<Response> {
1685 if (!approvers->approved<SET_LOG_LEVEL>()) {
1686 return Forbidden();
1687 }
1688
1689 return dispatch(process::logging(), &Logging::set_level, level, duration)
1690 .then([]() -> Response {
1691 return OK();
1692 });
1693 });
1694}
1695
1696
1697Future<Response> Master::Http::getMaster(

Callers

nothing calls this directly

Calls 9

NanosecondsClass · 0.85
ForbiddenClass · 0.85
loggingFunction · 0.85
OKClass · 0.85
typeMethod · 0.80
durationMethod · 0.80
createFunction · 0.50
dispatchFunction · 0.50
thenMethod · 0.45

Tested by

no test coverage detected