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

Method setLoggingLevel

src/slave/http.cpp:1150–1176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1148
1149
1150Future<Response> Http::setLoggingLevel(
1151 const mesos::agent::Call& call,
1152 ContentType /*contentType*/,
1153 const Option<Principal>& principal) const
1154{
1155 CHECK_EQ(mesos::agent::Call::SET_LOGGING_LEVEL, call.type());
1156 CHECK(call.has_set_logging_level());
1157
1158 uint32_t level = call.set_logging_level().level();
1159 Duration duration =
1160 Nanoseconds(call.set_logging_level().duration().nanoseconds());
1161
1162 LOG(INFO) << "Processing SET_LOGGING_LEVEL call for level " << level;
1163
1164 return ObjectApprovers::create(slave->authorizer, principal, {SET_LOG_LEVEL})
1165 .then([level, duration](
1166 const Owned<ObjectApprovers>& approvers) -> Future<Response> {
1167 if (!approvers->approved<SET_LOG_LEVEL>()) {
1168 return Forbidden();
1169 }
1170
1171 return dispatch(process::logging(), &Logging::set_level, level, duration)
1172 .then([]() -> Response {
1173 return OK();
1174 });
1175 });
1176}
1177
1178
1179Future<Response> Http::listFiles(

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