Move unnecessary INFO logs to VLOG.

PiperOrigin-RevId: 797451961
This commit is contained in:
Francis Tsui
2025-08-20 13:58:51 -07:00
committed by Copybara-Service
parent 9087989a42
commit 6113d225e9
10 changed files with 38 additions and 41 deletions
@@ -164,7 +164,7 @@ OperationResultCategory ConvertToOperationResultCategory(
AnalyticsRecorder::AnalyticsRecorder(EventLogger *event_logger)
: event_logger_(event_logger) {
LOG(INFO) << "Start AnalyticsRecorder ctor event_logger_=" << event_logger_;
VLOG(1) << "Start AnalyticsRecorder ctor event_logger_=" << event_logger_;
LogStartSession();
}
+1 -1
View File
@@ -89,7 +89,7 @@ bool IsFeatureUseStableEndpointIdEnabled() {
ClientProxy::ClientProxy(::nearby::analytics::EventLogger* event_logger)
: client_id_(Prng().NextInt64()) {
LOG(INFO) << "ClientProxy ctor event_logger=" << event_logger;
VLOG(1) << "ClientProxy ctor event_logger=" << event_logger;
is_dct_enabled_ = NearbyFlags::GetInstance().GetBoolFlag(
config_package_nearby::nearby_connections_feature::kEnableDct);
analytics_recorder_ =
@@ -476,10 +476,10 @@ void EndpointManager::RegisterFrameProcessor(
frame_processor.set(processor);
} else {
MutexLock lock(&frame_processors_lock_);
LOG(INFO) << "EndpointManager received request to add registration "
"of frame processor "
<< processor << " for frame type "
<< V1Frame::FrameType_Name(frame_type) << ", self=" << this;
VLOG(1) << "EndpointManager received request to add registration "
"of frame processor "
<< processor << " for frame type "
<< V1Frame::FrameType_Name(frame_type) << ", self=" << this;
frame_processors_.emplace(frame_type, processor);
}
}
@@ -96,10 +96,7 @@ ServiceControllerRouter::ServiceControllerRouter() {
ServiceControllerRouter::ServiceControllerRouter(
absl::AnyInvocable<bool()> if_hp_realtek_device)
: if_hp_realtek_device_(std::move(if_hp_realtek_device)) {
LOG(INFO)
<< "ServiceControllerRouter going up checking if_hp_realtek_device.";
}
: if_hp_realtek_device_(std::move(if_hp_realtek_device)) {}
// Constructor called by the CrOS platform implementation to override the
// kEnableBleV2 flag.
+9 -9
View File
@@ -98,11 +98,11 @@ void LeveldbDataSet<T, isMessageLite>::Initialize(
LOG(INFO) << "Database is initialized successfully..";
} else if (status.IsCorruption() || status.IsIOError()) {
status_ = InitStatus::kCorrupt;
LOG(INFO) << "Database is corrupt.";
LOG(WARNING) << "Database is corrupt.";
} else {
status_ = InitStatus::kError;
LOG(INFO) << "Failed to initialize database due to unknown error.";
LOG(ERROR) << "Failed to initialize database due to unknown error.";
}
std::move(callback)(status_);
}
@@ -129,10 +129,10 @@ void LeveldbDataSet<T, isMessageLite>::LoadEntries(
}
if (it->status().ok()) {
LOG(INFO) << "Loaded " << result->size() << " entries from database.";
VLOG(1) << "Loaded " << result->size() << " entries from database.";
std::move(callback)(true, std::move(result));
} else {
LOG(INFO) << "Failed to load entries from database.";
LOG(ERROR) << "Failed to load entries from database.";
result->clear();
std::move(callback)(false, std::move(result));
}
@@ -152,7 +152,7 @@ void LeveldbDataSet<T, isMessageLite>::LoadEntry(
std::string value;
if (!db_->Get(leveldb::ReadOptions(), std::string(key), &value).ok()) {
LOG(INFO) << "Failed to load entry from database with key: " << key;
LOG(WARNING) << "Failed to load entry from database with key: " << key;
std::move(callback)(false, std::move(result));
return;
}
@@ -183,10 +183,10 @@ void LeveldbDataSet<T, isMessageLite>::LoadEntriesWithKeys(
}
if (it->status().ok()) {
LOG(INFO) << "Loaded " << result->size() << " entries from database.";
VLOG(1) << "Loaded " << result->size() << " entries from database.";
std::move(callback)(true, std::move(result));
} else {
LOG(INFO) << "Failed to load entries from database.";
LOG(WARNING) << "Failed to load entries from database.";
result->clear();
std::move(callback)(false, std::move(result));
}
@@ -199,7 +199,7 @@ void LeveldbDataSet<T, isMessageLite>::UpdateEntries(
std::unique_ptr<KeyEntryVector> entries_to_save,
std::unique_ptr<std::vector<std::string>> keys_to_remove,
absl::AnyInvocable<void(bool) &&> callback) {
LOG(INFO) << "UpdateEntries is called.";
VLOG(1) << "UpdateEntries is called.";
if (status_ != InitStatus::kOK) {
std::move(callback)(false);
return;
@@ -227,7 +227,7 @@ template <typename T,
isMessageLite>
void LeveldbDataSet<T, isMessageLite>::Destroy(
absl::AnyInvocable<void(bool) &&> callback) {
LOG(INFO) << "Destroy is called.";
VLOG(1) << "Destroy is called.";
db_.reset();
leveldb::DestroyDB(path_, db_options_);
std::move(callback)(true);
@@ -81,7 +81,7 @@ bool PreferencesRepository::SavePreferences(json preferences) {
// Create a backup without moving the bytes on disk
if (Files::FileExists(full_name)) {
LOG(INFO) << "Making backup of preferences file.";
VLOG(1) << "Making backup of preferences file.";
if (!Files::Rename(full_name, full_name_backup)) {
LOG(ERROR) << "Failed to rename preferences backup file.";
}
@@ -37,12 +37,12 @@ void CALLBACK TimerRoutine(PVOID lpParam, BOOLEAN TimerOrWaitFired) {
} // namespace
TaskScheduler::TaskScheduler() {
LOG(INFO) << __func__ << ": Created task scheduler: " << this;
VLOG(1) << __func__ << ": Created task scheduler: " << this;
}
TaskScheduler::~TaskScheduler() {
Shutdown();
LOG(INFO) << __func__ << ": Destroyed task scheduler: " << this;
VLOG(1) << __func__ << ": Destroyed task scheduler: " << this;
}
std::shared_ptr<api::Cancelable> TaskScheduler::Schedule(
@@ -54,10 +54,10 @@ std::shared_ptr<api::Cancelable> TaskScheduler::Schedule(
Runnable&& runnable, absl::Duration duration,
absl::Duration repeat_interval) {
absl::MutexLock lock(&mutex_);
LOG(INFO) << __func__ << ": Scheduling task on task scheduler:" << this
<< ", duration: " << absl::ToInt64Milliseconds(duration)
<< "ms, repeat_interval: "
<< absl::ToInt64Milliseconds(repeat_interval) << "ms";
VLOG(1) << __func__ << ": Scheduling task on task scheduler:" << this
<< ", duration: " << absl::ToInt64Milliseconds(duration)
<< "ms, repeat_interval: "
<< absl::ToInt64Milliseconds(repeat_interval) << "ms";
if (is_shutdown_) {
LOG(ERROR) << __func__
<< ": Attempt to schedule task on a shut down task "
@@ -86,15 +86,15 @@ std::shared_ptr<api::Cancelable> TaskScheduler::Schedule(
task->set_timer_handle(reinterpret_cast<intptr_t>(timer_handle));
scheduled_tasks_.insert({reinterpret_cast<intptr_t>(timer_handle), task});
LOG(INFO) << __func__ << ": Scheduled task " << task.get()
<< " on task scheduler:" << this
<< " timer handle: " << task->timer_handle();
VLOG(1) << __func__ << ": Scheduled task " << task.get()
<< " on task scheduler:" << this
<< " timer handle: " << task->timer_handle();
return task;
}
void TaskScheduler::Shutdown() {
absl::MutexLock lock(&mutex_);
LOG(INFO) << __func__ << ": Shutting down task scheduler:" << this;
VLOG(1) << __func__ << ": Shutting down task scheduler:" << this;
if (is_shutdown_) {
return;
}
@@ -115,7 +115,7 @@ void TaskScheduler::Shutdown() {
}
scheduled_tasks_.clear();
is_shutdown_ = true;
LOG(INFO) << __func__ << ": Shut down task scheduler:" << this;
VLOG(1) << __func__ << ": Shut down task scheduler:" << this;
}
TaskScheduler::ScheduledTask::ScheduledTask(TaskScheduler& task_scheduler,
@@ -134,8 +134,8 @@ TaskScheduler::ScheduledTask::ScheduledTask(TaskScheduler& task_scheduler,
}
bool TaskScheduler::ScheduledTask::Cancel() {
LOG(INFO) << __func__ << ": Cancelling timer " << timer_handle()
<< " from task scheduler:" << this;
VLOG(1) << __func__ << ": Cancelling timer " << timer_handle()
<< " from task scheduler:" << this;
{
absl::MutexLock lock(&mutex_);
if (is_cancelled_) {
@@ -98,7 +98,7 @@ std::unique_ptr<api::WifiLanSocket> WifiLanServerSocket::Accept() {
return std::make_unique<WifiLanSocket>(std::move(client_socket));
} else {
absl::MutexLock lock(&mutex_);
LOG(INFO) << __func__ << ": Accept is called.";
VLOG(1) << __func__ << ": Accept is called.";
while (!closed_ && pending_sockets_.empty()) {
cond_.Wait(&mutex_);
}
@@ -121,7 +121,7 @@ void WifiLanServerSocket::SetCloseNotifier(
Exception WifiLanServerSocket::Close() {
try {
absl::MutexLock lock(&mutex_);
LOG(INFO) << __func__ << ": Close is called.";
VLOG(1) << __func__ << ": Close is called.";
if (enable_blocking_socket_) {
if (closed_) {
return {Exception::kSuccess};
@@ -240,7 +240,7 @@ NearbyShareCertificateManagerImpl::NearbyShareCertificateManagerImpl(
/*require_connectivity=*/false,
prefs::kNearbySharingSchedulerPrivateCertificateExpirationName,
[this]() {
LOG(INFO)
VLOG(1)
<< "Private certificate expiration scheduler is called.";
executor_->PostTask([this]() {
private_certificate_expiration_scheduler_->HandleResult(
@@ -256,7 +256,7 @@ NearbyShareCertificateManagerImpl::NearbyShareCertificateManagerImpl(
/*require_connectivity=*/false,
prefs::kNearbySharingSchedulerPublicCertificateExpirationName,
[this]() {
LOG(INFO)
VLOG(1)
<< ": Public certificate expiration scheduler is called.";
executor_->PostTask([this]() {
public_certificate_expiration_scheduler_->HandleResult(
@@ -271,7 +271,7 @@ NearbyShareCertificateManagerImpl::NearbyShareCertificateManagerImpl(
/*require_connectivity=*/true,
prefs::kNearbySharingSchedulerUploadLocalDeviceCertificatesName,
[this]() {
LOG(INFO)
VLOG(1)
<< "Upload local device certificates scheduler is called.";
executor_->PostTask([this]() {
force_contacts_update_scheduler_->HandleResult(
@@ -799,7 +799,7 @@ bool NearbyShareCertificateManagerImpl::RefreshPrivateCertificatesInExecutor(
force_contacts_update_scheduler_->MakeImmediateRequest();
} else {
executor_->PostTask([this]() {
LOG(INFO) << "Begin UploadDeviceCertificatesInExecutor";
VLOG(1) << "Begin UploadDeviceCertificatesInExecutor";
UploadDeviceCertificatesInExecutor(
certificate_storage_->GetPrivateCertificates(),
/*force_update_contacts=*/false);
@@ -281,11 +281,11 @@ void NearbyFastInitiationImpl::AdvertisingErrorCodeCallbackHandler(
void NearbyFastInitiationImpl::AddObserver(Observer* observer) {
observer_list_.AddObserver(observer);
LOG(INFO) << __func__ << ": Fast Initiation observer added.";
VLOG(1) << __func__ << ": Fast Initiation observer added.";
}
void NearbyFastInitiationImpl::RemoveObserver(Observer* observer) {
observer_list_.RemoveObserver(observer);
LOG(INFO) << __func__ << ": Fast Initiation observer removed.";
VLOG(1) << __func__ << ": Fast Initiation observer removed.";
}
bool NearbyFastInitiationImpl::HasObserver(Observer* observer) {
return observer_list_.HasObserver(observer);