
com.anrisoftware.globalpom.threads.watchdog.ThreadsWatchdogLogger Maven / Gradle / Ivy
/*
* Copyright 2013-2025 Erwin Müller
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.anrisoftware.globalpom.threads.watchdog;
/*-
* #%L
* Global POM Utilities :: Threads
* %%
* Copyright (C) 2013 - 2018 Advanced Natural Research Institute
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.concurrent.Future;
import jakarta.inject.Singleton;
import com.anrisoftware.globalpom.log.AbstractLogger;
import com.anrisoftware.globalpom.threads.external.listenablefuture.DefaultListenableFuture;
/**
* Logging messages for {@link ThreadsWatchdog}.
*
* @author Erwin Mueller, [email protected]
* @since 1.5
*/
@Singleton
class ThreadsWatchdogLogger extends AbstractLogger {
private static final String TASK_DONE = "Task {} done.";
private static final String TASK_SUBMITTED = "Task {} submitted.";
/**
* Create logger for {@link ThreadsWatchdog}.
*/
public ThreadsWatchdogLogger() {
super(ThreadsWatchdog.class);
}
void taskSubmitted(DefaultListenableFuture> task) {
log.debug(TASK_SUBMITTED, task);
}
void taskDone(Future> future) {
log.debug(TASK_DONE, future);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy