use of co.cask.cdap.app.runtime.LogLevelUpdater in project cdap by caskdata.
the class ProgramLifecycleService method resetLogLevels.
/**
* Helper method to reset log levels for Worker, Flow or Service.
*/
private void resetLogLevels(ProgramId programId, Set<String> loggerNames, @Nullable String component, @Nullable String runId) throws Exception {
List<ProgramRuntimeService.RuntimeInfo> runtimeInfos = findRuntimeInfo(programId, runId);
ProgramRuntimeService.RuntimeInfo runtimeInfo = runtimeInfos.isEmpty() ? null : runtimeInfos.get(0);
if (runtimeInfo != null) {
LogLevelUpdater logLevelUpdater = getLogLevelUpdater(runtimeInfo);
logLevelUpdater.resetLogLevels(loggerNames, component);
}
}
use of co.cask.cdap.app.runtime.LogLevelUpdater in project cdap by caskdata.
the class ProgramLifecycleService method updateLogLevels.
/**
* Helper method to update log levels for Worker, Flow, or Service.
*/
private void updateLogLevels(ProgramId programId, Map<String, LogEntry.Level> logLevels, @Nullable String component, @Nullable String runId) throws Exception {
List<ProgramRuntimeService.RuntimeInfo> runtimeInfos = findRuntimeInfo(programId, runId);
ProgramRuntimeService.RuntimeInfo runtimeInfo = runtimeInfos.isEmpty() ? null : runtimeInfos.get(0);
if (runtimeInfo != null) {
LogLevelUpdater logLevelUpdater = getLogLevelUpdater(runtimeInfo);
logLevelUpdater.updateLogLevels(logLevels, component);
}
}
Aggregations