Removing MultiLogHost
We really don't want to expose this as part of API surface.
Host-side already has logging system.
Test: presubmit
Bug: 202790010
Change-Id: Iebf8c07364454fd085932d93aa8c522a99d28e87
diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/ExtraBusinessLogicHostTestBase.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/ExtraBusinessLogicHostTestBase.java
index 742de92..3ae3921 100644
--- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/ExtraBusinessLogicHostTestBase.java
+++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/ExtraBusinessLogicHostTestBase.java
@@ -18,9 +18,9 @@
import static org.junit.Assert.assertTrue;
-import com.android.compatibility.common.tradefed.util.MultiLogHost;
import com.android.compatibility.common.util.BusinessLogicExecutor;
import com.android.compatibility.common.util.BusinessLogicHostExecutor;
+import com.android.tradefed.log.LogUtil.CLog;
import org.junit.Before;
@@ -30,19 +30,15 @@
* Host-side base class for tests to run extra Business Logics in addition to the test-specific
* Business Logics.
*
- * Used when running a common set of business logics against several tests.
+ * <p>Used when running a common set of business logics against several tests.
*
- * Usage:
- * 1. Implement the common logic in an interface with default methods.
- * 2. Extend this class and implement the interface.
+ * <p>Usage: 1. Implement the common logic in an interface with default methods. 2. Extend this
+ * class and implement the interface.
*
- * Now Business Logics rules and actions can be called from the GCL by using the interface fully
+ * <p>Now Business Logics rules and actions can be called from the GCL by using the interface fully
* qualified name.
*/
-public abstract class ExtraBusinessLogicHostTestBase
- extends BusinessLogicHostTestBase implements MultiLogHost {
-
- private static final String LOG_TAG = ExtraBusinessLogicHostTestBase.class.getSimpleName();
+public abstract class ExtraBusinessLogicHostTestBase extends BusinessLogicHostTestBase {
protected boolean mDependentOnBusinessLogic = true;
@@ -57,7 +53,7 @@
"Test \"%s\" is unable to execute as it depends on the missing remote "
+ "configuration.", mTestCase.getMethodName()), mCanReadBusinessLogic);
} else if (!mCanReadBusinessLogic) {
- logInfo(LOG_TAG, "Skipping Business Logic for %s", mTestCase.getMethodName());
+ CLog.i("Skipping Business Logic for %s", mTestCase.getMethodName());
return;
}
diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/util/MultiLogHost.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/util/MultiLogHost.java
deleted file mode 100644
index 21f55e9..0000000
--- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/util/MultiLogHost.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * 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.android.compatibility.common.tradefed.util;
-
-import com.android.compatibility.common.util.MultiLog;
-import com.android.ddmlib.Log;
-
-/** Implement the hostside interface for logging on host+device-common code. */
-public interface MultiLogHost extends MultiLog {
- /** {@inheritDoc} */
- @Override
- default void logInfo(String logTag, String format, Object... args) {
- Log.i(logTag, String.format(format, args));
- }
-
- /** {@inheritDoc} */
- @Override
- default void logDebug(String logTag, String format, Object... args) {
- Log.d(logTag, String.format(format, args));
- }
-
- /** {@inheritDoc} */
- @Override
- default void logWarn(String logTag, String format, Object... args) {
- Log.w(logTag, String.format(format, args));
- }
-
- /** {@inheritDoc} */
- @Override
- default void logError(String logTag, String format, Object... args) {
- Log.e(logTag, String.format(format, args));
- }
-}