Merge "Logging improvements"
diff --git a/authfs/src/fusefs.rs b/authfs/src/fusefs.rs
index cfb53ca..544a94e 100644
--- a/authfs/src/fusefs.rs
+++ b/authfs/src/fusefs.rs
@@ -23,7 +23,7 @@
     SetattrValid, ZeroCopyReader, ZeroCopyWriter,
 };
 use fuse::sys::OpenOptions as FuseOpenOptions;
-use log::{debug, error, warn};
+use log::{error, trace, warn};
 use std::collections::{btree_map, BTreeMap};
 use std::convert::{TryFrom, TryInto};
 use std::ffi::{CStr, CString, OsStr};
@@ -1062,7 +1062,7 @@
             | SetattrValid::MTIME
             | SetattrValid::MTIME_NOW,
     ) {
-        debug!("Ignoring ctime/atime/mtime change as authfs does not maintain timestamp currently");
+        trace!("Ignoring ctime/atime/mtime change as authfs does not maintain timestamp currently");
     }
     Ok(())
 }
diff --git a/compos/tests/java/android/compos/test/ComposTestCase.java b/compos/tests/java/android/compos/test/ComposTestCase.java
index fe1c4f0..4e3d0a8 100644
--- a/compos/tests/java/android/compos/test/ComposTestCase.java
+++ b/compos/tests/java/android/compos/test/ComposTestCase.java
@@ -27,6 +27,7 @@
 
 import com.android.microdroid.test.host.CommandRunner;
 import com.android.microdroid.test.host.MicrodroidHostTestCaseBase;
+import com.android.tradefed.device.DeviceNotAvailableException;
 import com.android.tradefed.log.LogUtil.CLog;
 import com.android.tradefed.result.FileInputStreamSource;
 import com.android.tradefed.result.LogDataType;
@@ -94,10 +95,7 @@
     public void tearDown() throws Exception {
         killVmAndReconnectAdb();
 
-        archiveLogThenDelete(mTestLogs, getDevice(), COMPOS_APEXDATA_DIR + "/vm_console.log",
-                "vm_console.log-" + mTestName.getMethodName());
-        archiveLogThenDelete(mTestLogs, getDevice(), COMPOS_APEXDATA_DIR + "/vm.log",
-                "vm.log-" + mTestName.getMethodName());
+        archiveVmLogsThenDelete("teardown");
 
         CommandRunner android = new CommandRunner(getDevice());
 
@@ -115,6 +113,19 @@
         }
     }
 
+    private void archiveVmLogsThenDelete(String suffix) throws DeviceNotAvailableException {
+        archiveLogThenDelete(
+                mTestLogs,
+                getDevice(),
+                COMPOS_APEXDATA_DIR + "/vm_console.log",
+                "vm_console.log-" + suffix + "-" + mTestName.getMethodName());
+        archiveLogThenDelete(
+                mTestLogs,
+                getDevice(),
+                COMPOS_APEXDATA_DIR + "/vm.log",
+                "vm.log-" + suffix + "-" + mTestName.getMethodName());
+    }
+
     @Test
     public void testOdrefreshSpeed() throws Exception {
         getDevice().setProperty(SYSTEM_SERVER_COMPILER_FILTER_PROP_NAME, "speed");
@@ -159,6 +170,10 @@
         }
         killVmAndReconnectAdb();
 
+        // These logs are potentially useful, capture them before they are overwritten by
+        // compos_verify.
+        archiveVmLogsThenDelete("compile");
+
         // Expect the BCC extracted from the BCC to be well-formed.
         assertVmBccIsValid();