Remove usage of INFO alias for LS_INFO in log messages
Bug: webrtc:13362
Change-Id: Ifda893861a036a85c045cd366f9eab33c62ebde0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237221
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35310}
diff --git a/modules/utility/source/jvm_android.cc b/modules/utility/source/jvm_android.cc
index 8e24daa..ee9930b 100644
--- a/modules/utility/source/jvm_android.cc
+++ b/modules/utility/source/jvm_android.cc
@@ -38,10 +38,10 @@
// stack. Consequently, we only look up all classes once in native WebRTC.
// http://developer.android.com/training/articles/perf-jni.html#faq_FindClass
void LoadClasses(JNIEnv* jni) {
- RTC_LOG(INFO) << "LoadClasses:";
+ RTC_LOG(LS_INFO) << "LoadClasses:";
for (auto& c : loaded_classes) {
jclass localRef = FindClass(jni, c.name);
- RTC_LOG(INFO) << "name: " << c.name;
+ RTC_LOG(LS_INFO) << "name: " << c.name;
CHECK_EXCEPTION(jni) << "Error during FindClass: " << c.name;
RTC_CHECK(localRef) << c.name;
jclass globalRef = reinterpret_cast<jclass>(jni->NewGlobalRef(localRef));
@@ -69,12 +69,12 @@
// JvmThreadConnector implementation.
JvmThreadConnector::JvmThreadConnector() : attached_(false) {
- RTC_LOG(INFO) << "JvmThreadConnector::ctor";
+ RTC_LOG(LS_INFO) << "JvmThreadConnector::ctor";
JavaVM* jvm = JVM::GetInstance()->jvm();
RTC_CHECK(jvm);
JNIEnv* jni = GetEnv(jvm);
if (!jni) {
- RTC_LOG(INFO) << "Attaching thread to JVM";
+ RTC_LOG(LS_INFO) << "Attaching thread to JVM";
JNIEnv* env = nullptr;
jint ret = jvm->AttachCurrentThread(&env, nullptr);
attached_ = (ret == JNI_OK);
@@ -82,10 +82,10 @@
}
JvmThreadConnector::~JvmThreadConnector() {
- RTC_LOG(INFO) << "JvmThreadConnector::dtor";
+ RTC_LOG(LS_INFO) << "JvmThreadConnector::dtor";
RTC_DCHECK(thread_checker_.IsCurrent());
if (attached_) {
- RTC_LOG(INFO) << "Detaching thread from JVM";
+ RTC_LOG(LS_INFO) << "Detaching thread from JVM";
jint res = JVM::GetInstance()->jvm()->DetachCurrentThread();
RTC_CHECK(res == JNI_OK) << "DetachCurrentThread failed: " << res;
}
@@ -94,11 +94,11 @@
// GlobalRef implementation.
GlobalRef::GlobalRef(JNIEnv* jni, jobject object)
: jni_(jni), j_object_(NewGlobalRef(jni, object)) {
- RTC_LOG(INFO) << "GlobalRef::ctor";
+ RTC_LOG(LS_INFO) << "GlobalRef::ctor";
}
GlobalRef::~GlobalRef() {
- RTC_LOG(INFO) << "GlobalRef::dtor";
+ RTC_LOG(LS_INFO) << "GlobalRef::dtor";
DeleteGlobalRef(jni_, j_object_);
}
@@ -131,11 +131,11 @@
// NativeRegistration implementation.
NativeRegistration::NativeRegistration(JNIEnv* jni, jclass clazz)
: JavaClass(jni, clazz), jni_(jni) {
- RTC_LOG(INFO) << "NativeRegistration::ctor";
+ RTC_LOG(LS_INFO) << "NativeRegistration::ctor";
}
NativeRegistration::~NativeRegistration() {
- RTC_LOG(INFO) << "NativeRegistration::dtor";
+ RTC_LOG(LS_INFO) << "NativeRegistration::dtor";
jni_->UnregisterNatives(j_class_);
CHECK_EXCEPTION(jni_) << "Error during UnregisterNatives";
}
@@ -143,7 +143,7 @@
std::unique_ptr<GlobalRef> NativeRegistration::NewObject(const char* name,
const char* signature,
...) {
- RTC_LOG(INFO) << "NativeRegistration::NewObject";
+ RTC_LOG(LS_INFO) << "NativeRegistration::NewObject";
va_list args;
va_start(args, signature);
jobject obj = jni_->NewObjectV(
@@ -181,11 +181,11 @@
// JNIEnvironment implementation.
JNIEnvironment::JNIEnvironment(JNIEnv* jni) : jni_(jni) {
- RTC_LOG(INFO) << "JNIEnvironment::ctor";
+ RTC_LOG(LS_INFO) << "JNIEnvironment::ctor";
}
JNIEnvironment::~JNIEnvironment() {
- RTC_LOG(INFO) << "JNIEnvironment::dtor";
+ RTC_LOG(LS_INFO) << "JNIEnvironment::dtor";
RTC_DCHECK(thread_checker_.IsCurrent());
}
@@ -193,7 +193,7 @@
const char* name,
const JNINativeMethod* methods,
int num_methods) {
- RTC_LOG(INFO) << "JNIEnvironment::RegisterNatives: " << name;
+ RTC_LOG(LS_INFO) << "JNIEnvironment::RegisterNatives: " << name;
RTC_DCHECK(thread_checker_.IsCurrent());
jclass clazz = LookUpClass(name);
jni_->RegisterNatives(clazz, methods, num_methods);
@@ -216,7 +216,7 @@
// static
void JVM::Initialize(JavaVM* jvm) {
- RTC_LOG(INFO) << "JVM::Initialize";
+ RTC_LOG(LS_INFO) << "JVM::Initialize";
RTC_CHECK(!g_jvm);
g_jvm = new JVM(jvm);
}
@@ -234,7 +234,7 @@
// static
void JVM::Uninitialize() {
- RTC_LOG(INFO) << "JVM::Uninitialize";
+ RTC_LOG(LS_INFO) << "JVM::Uninitialize";
RTC_DCHECK(g_jvm);
delete g_jvm;
g_jvm = nullptr;
@@ -247,19 +247,19 @@
}
JVM::JVM(JavaVM* jvm) : jvm_(jvm) {
- RTC_LOG(INFO) << "JVM::JVM";
+ RTC_LOG(LS_INFO) << "JVM::JVM";
RTC_CHECK(jni()) << "AttachCurrentThread() must be called on this thread.";
LoadClasses(jni());
}
JVM::~JVM() {
- RTC_LOG(INFO) << "JVM::~JVM";
+ RTC_LOG(LS_INFO) << "JVM::~JVM";
RTC_DCHECK(thread_checker_.IsCurrent());
FreeClassReferences(jni());
}
std::unique_ptr<JNIEnvironment> JVM::environment() {
- RTC_LOG(INFO) << "JVM::environment";
+ RTC_LOG(LS_INFO) << "JVM::environment";
;
// The JNIEnv is used for thread-local storage. For this reason, we cannot
// share a JNIEnv between threads. If a piece of code has no other way to get
@@ -276,7 +276,7 @@
}
JavaClass JVM::GetClass(const char* name) {
- RTC_LOG(INFO) << "JVM::GetClass: " << name;
+ RTC_LOG(LS_INFO) << "JVM::GetClass: " << name;
RTC_DCHECK(thread_checker_.IsCurrent());
return JavaClass(jni(), LookUpClass(name));
}