[harvester] Move noisy logs from ERROR to DEBUG.

Change-Id: I8f6a6507db11ecafd0c62ee15d0ca41f39fa4393
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/474582
Reviewed-by: Jayson Adams <shrike@google.com>
Commit-Queue: Alex Bogart <abbogart@google.com>
diff --git a/src/developer/system_monitor/bin/harvester/os.h b/src/developer/system_monitor/bin/harvester/os.h
index 11a180c..79874cc 100644
--- a/src/developer/system_monitor/bin/harvester/os.h
+++ b/src/developer/system_monitor/bin/harvester/os.h
@@ -36,9 +36,13 @@
         parent, children_kind, nullptr, 0, nullptr, &num_children);
 
     if (status != ZX_OK) {
-      FX_LOGS(ERROR) << "zx_object_get_info(" << parent_koid << ", "
-                     << kind_name << ", ...) failed: "
-                     << zx_status_get_string(status) << " (" << status << ")";
+      // ZX_ERR_BAD_STATE is returned when a process is already destroyed. This
+      // is not exceptional; pass through the error code but don't spam logs.
+      if (status != ZX_ERR_BAD_STATE) {
+        FX_LOGS(ERROR) << "zx_object_get_info(" << parent_koid << ", "
+                       << kind_name << ", ...) failed: "
+                       << zx_status_get_string(status) << " (" << status << ")";
+      }
       return status;
     }
 
@@ -53,9 +57,13 @@
                      children.capacity() * sizeof(T), &actual, &available);
 
     if (status != ZX_OK) {
-      FX_LOGS(ERROR) << "zx_object_get_info(" << parent_koid << ", "
-                     << kind_name << ", ...) failed: "
-                     << zx_status_get_string(status) << " (" << status << ")";
+      // ZX_ERR_BAD_STATE is returned when a process is already destroyed. This
+      // is not exceptional; pass through the error code but don't spam logs.
+      if (status != ZX_ERR_BAD_STATE) {
+        FX_LOGS(ERROR) << "zx_object_get_info(" << parent_koid << ", "
+                       << kind_name << ", ...) failed: "
+                       << zx_status_get_string(status) << " (" << status << ")";
+      }
       // On error, empty children so we don't pass through invalid information.
       children.clear();
       return status;