Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,8 @@ Result<std::set<std::string>> PreservingOnResume(
"Restoring from snapshot requires not creating OS disks");
if (creating_os_disk) {
// not snapshot restore, must be --resume
LOG(INFO) << "Requested resuming a previous session (the default behavior) "
<< "but the base images have changed under the overlay, making "
<< "the overlay incompatible. Wiping the overlay files.";
VLOG(0) << "Trying to resume previous session, but base images have "
"changed. Wiping overlay files.";
if (InSandbox()) {
return {{"launcher.log"}};
} else {
Expand Down Expand Up @@ -429,7 +428,7 @@ Result<const CuttlefishConfig*> InitFilesystemAndCreateConfig(

auto environment =
const_cast<const CuttlefishConfig&>(config).ForDefaultEnvironment();
LOG(INFO) << "Path for instance UDS: " << config.instances_uds_dir();
VLOG(0) << "Path for instance UDS: " << config.instances_uds_dir();

for (const auto& instance : config.Instances()) {
std::string vsock_dir = fmt::format("{}/vsock_{}_{}", TempDir(),
Expand Down
16 changes: 8 additions & 8 deletions base/cvd/cuttlefish/host/commands/assemble_cvd/graphics_flags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -501,14 +501,14 @@ Result<bool> SelectGpuVhostUserMode(const GpuMode gpu_mode,
gpu_vhost_user_mode_arg == kGpuVhostUserModeOff);
if (gpu_vhost_user_mode_arg == kGpuVhostUserModeAuto) {
if (gpu_mode == GpuMode::GuestSwiftshader) {
LOG(INFO) << "GPU vhost user auto mode: not needed for --gpu_mode="
<< GpuModeString(gpu_mode) << ". Not enabling vhost user gpu.";
VLOG(0) << "GPU vhost user auto mode: not needed for --gpu_mode="
<< GpuModeString(gpu_mode) << ". Not enabling vhost user gpu.";
return false;
}

if (!VmManagerIsCrosvm(vmm)) {
LOG(INFO) << "GPU vhost user auto mode: not yet supported with " << vmm
<< ". Not enabling vhost user gpu.";
VLOG(0) << "GPU vhost user auto mode: not yet supported with " << vmm
<< ". Not enabling vhost user gpu.";
return false;
}

Expand All @@ -517,13 +517,13 @@ Result<bool> SelectGpuVhostUserMode(const GpuMode gpu_mode,
// in a separate process with a VMM prebuilt. See b/200592498.
const auto host_arch = HostArch();
if (host_arch == Arch::Arm64) {
LOG(INFO) << "GPU vhost user auto mode: detected arm64 host. Enabling "
"vhost user gpu.";
VLOG(0) << "GPU vhost user auto mode: detected arm64 host. Enabling "
"vhost user gpu.";
return true;
}

LOG(INFO) << "GPU vhost user auto mode: not needed. Not enabling vhost "
"user gpu.";
VLOG(0) << "GPU vhost user auto mode: not needed. Not enabling vhost "
"user gpu.";
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ Result<void> CvdStartCommandHandler::LaunchDevice(
"information won't show in the UI: "
<< conn_res.error();
}
LOG(INFO) << "launch command: " << launch_command;
VLOG(0) << "launch command: " << launch_command;

CF_EXPECT(subprocess_waiter_.Setup(launch_command));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,9 @@ Result<SharedFD> DaemonizeLauncher(const CuttlefishConfig& config) {
}
if (!IsRestoring(config)) {
if (exit_code == RunnerExitCodes::kSuccess) {
LOG(INFO) << kBootCompletedMessage;
VLOG(0) << kBootCompletedMessage;
} else {
LOG(INFO) << kBootFailedMessage;
LOG(ERROR) << kBootFailedMessage;
}
}
std::exit(exit_code);
Expand Down Expand Up @@ -597,7 +597,6 @@ class CvdBootStateMachine : public SetupFeature, public KernelLogPipeConsumer {
}

if ((*read_result)->event == monitor::Event::BootCompleted) {
LOG(INFO) << "Virtual device booted successfully";
state_ |= kGuestBootCompleted;
if (!instance_.vcpu_config_path().empty()) {
auto res = WattsonRebalanceThreads(instance_.id());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include "absl/log/check.h"

#include "cuttlefish/common/libs/utils/subprocess.h"
#include "cuttlefish/host/commands/run_cvd/reporting.h"
#include "cuttlefish/host/libs/config/config_instance_derived.h"
#include "cuttlefish/host/libs/config/cuttlefish_config.h"
#include "cuttlefish/host/libs/config/known_paths.h"
Expand All @@ -47,17 +46,11 @@ namespace {

class KernelLogMonitor : public CommandSource,
public KernelLogPipeProvider,
public DiagnosticInformation,
public LateInjected {
public:
INJECT(KernelLogMonitor(const CuttlefishConfig::InstanceSpecific& instance))
: instance_(instance) {}

// DiagnosticInformation
std::vector<std::string> Diagnostics() const override {
return {"Kernel log: " + instance_.PerInstancePath("kernel.log")};
}

Result<void> LateInject(fruit::Injector<>& injector) override {
number_of_event_pipes_ =
injector.getMultibindings<KernelLogPipeConsumer>().size();
Expand Down Expand Up @@ -133,7 +126,6 @@ KernelLogMonitorComponent() {
.bind<KernelLogPipeProvider, KernelLogMonitor>()
.addMultibinding<CommandSource, KernelLogMonitor>()
.addMultibinding<SetupFeature, KernelLogMonitor>()
.addMultibinding<DiagnosticInformation, KernelLogMonitor>()
.addMultibinding<LateInjected, KernelLogMonitor>();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@

namespace cuttlefish {

std::string LogcatInfo(const CuttlefishConfig::InstanceSpecific& instance) {
return "Logcat output: " + LogcatPath(instance);
}

Result<MonitorCommand> LogcatReceiver(
const CuttlefishConfig::InstanceSpecific& instance) {
// Open the pipe here (from the launcher) to ensure the pipe is not deleted
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@

namespace cuttlefish {

std::string LogcatInfo(const CuttlefishConfig::InstanceSpecific& instance);

Result<MonitorCommand> LogcatReceiver(
const CuttlefishConfig::InstanceSpecific& instance);

Expand Down
9 changes: 1 addition & 8 deletions base/cvd/cuttlefish/host/commands/run_cvd/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,11 @@ namespace {

class CuttlefishEnvironment : public DiagnosticInformation {
public:
INJECT(
CuttlefishEnvironment(const CuttlefishConfig::InstanceSpecific& instance))
: instance_(instance) {}
INJECT(CuttlefishEnvironment()) {}

// DiagnosticInformation
std::vector<std::string> Diagnostics() const override {
auto config_path = instance_.PerInstancePath("cuttlefish_config.json");
return {
"Launcher log: " + instance_.launcher_log_path(),
"Instance configuration: " + config_path,
// TODO(rammuthiah) replace this with a more thorough cvd host package
// version scheme. Currently this only reports the Build Number of
// run_cvd and it is possible for other host binaries to be from
Expand All @@ -107,7 +102,6 @@ class CuttlefishEnvironment : public DiagnosticInformation {
}

private:
const CuttlefishConfig::InstanceSpecific& instance_;
};

class InstanceLifecycle : public LateInjected {
Expand Down Expand Up @@ -196,7 +190,6 @@ fruit::Component<> runCvdComponent(
.install(AutoCmd<EchoServer>::Component)
.install(AutoCmd<GnssGrpcProxyServer>::Component)
.install(AutoCmd<LogcatReceiver>::Component)
.install(AutoDiagnostic<LogcatInfo>::Component)
.install(KernelLogMonitorComponent)
.install(AutoCmd<MetricsService>::Component)
.install(OpenwrtControlServerComponent)
Expand Down
3 changes: 1 addition & 2 deletions base/cvd/cuttlefish/host/commands/run_cvd/reporting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ DiagnosticInformation::~DiagnosticInformation() = default;

void DiagnosticInformation::PrintAll(
const std::vector<DiagnosticInformation*>& infos) {
LOG(INFO) << kGreenColor
<< "The following lines contain useful debugging information:"
LOG(INFO) << kGreenColor << " Run `cvd logs` to report paths to device logs."
<< kResetColor;
for (const auto& info : infos) {
for (const auto& line : info->Diagnostics()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,40 +38,16 @@ std::string ValidateMetricsConfirmation(std::string use_metrics) {
}
}

std::cout << "==============================================================="
"====\n";
std::cout << "NOTICE:\n\n";
std::cout << "By using this Android Virtual Device, you agree to\n";
std::cout << "Google Terms of Service (https://policies.google.com/terms).\n";
std::cout
<< "The Google Privacy Policy (https://policies.google.com/privacy)\n";
std::cout
<< "describes how Google handles information generated as you use\n";
std::cout << "Google Services.";
char ch = !use_metrics.empty() ? tolower(use_metrics.at(0)) : -1;
if (ch != 'n') {
if (use_metrics.empty()) {
std::cout << "\n========================================================="
"==========\n";
std::cout << "Automatically send diagnostic information to Google, such "
"as crash\n";
std::cout << "reports and usage data from this Android Virtual Device. "
"You can\n";
std::cout << "adjust this permission at any time by running\n";
std::cout << "\"launch_cvd -report_anonymous_usage_stats=n\". (Y/n)?:";
std::cout << "\nAutomatically send diagnostic information to Google from "
"this Android Virtual "
"Device. You can adjust this permission by running \"--report_anonymous_usage_stats=n\". (Y/n)?:";
} else {
std::cout << " You can adjust the permission for sending\n";
std::cout << "diagnostic information to Google, such as crash reports "
"and usage\n";
std::cout
<< "data from this Android Virtual Device, at any time by running\n";
std::cout << "\"launch_cvd -report_anonymous_usage_stats=n\"\n";
std::cout << "==========================================================="
"========\n\n";
std::cout << "You can adjust the permission for sending diagnostic "
"information to Google by running \"--report_anonymous_usage_stats=n\"\n";
}
} else {
std::cout << "\n==========================================================="
"========\n\n";
}
for (;;) {
switch (ch) {
Expand Down
5 changes: 2 additions & 3 deletions base/cvd/cuttlefish/host/libs/config/config_flag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,12 @@ class ConfigFlagImpl : public ConfigFlag {
return {};
}
std::optional<std::string> FindAndroidInfoConfig(size_t index) const {
std::string info_path =
const std::string info_path =
system_image_dir_flag_.ForIndex(index) + "/android-info.txt";

LOG(INFO) << "Reading --config option from: " << info_path;
if (!FileExists(info_path)) {
return {};
}
VLOG(0) << "Reading --config option from: " << info_path;
Result<std::string> android_info_result = ReadFileContents(info_path);
if (!android_info_result.ok()) {
return {};
Expand Down
2 changes: 1 addition & 1 deletion base/cvd/cuttlefish/host/libs/config/fetcher_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ bool FetcherConfig::LoadFromFile(const std::string& file) {

auto base_dir = android::base::Dirname(file);
if (base_dir != "." && dictionary_.isMember(kCvdFiles)) {
LOG(INFO) << "Adjusting cvd_file paths to directory: " << base_dir;
VLOG(0) << "Adjusting cvd_file paths to directory: " << base_dir;
for (const auto& member_name : dictionary_[kCvdFiles].getMemberNames()) {
dictionary_[kCvdFiles][base_dir + "/" + member_name] =
dictionary_[kCvdFiles][member_name];
Expand Down
Loading