Commit 06ede0fa authored by Torne (Richard Coles)'s avatar Torne (Richard Coles) Committed by Commit Bot

Reduce various startup logspam on Android.

These log messages aren't generally interesting, and sometimes can be
confusing, especially to developers of WebView apps who see these
printed by their own applications and may not understand them.

Reduce their log levels to debug (which causes them to be stripped in
official release builds) or otherwise make them conditional.

Fixes: 1016010
Change-Id: I5f2375e87c9bc007723dc41c5e1276693fd5ddcc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1869288
Commit-Queue: Richard Coles <torne@chromium.org>
Auto-Submit: Richard Coles <torne@chromium.org>
Reviewed-by: default avatarYaron Friedman <yfriedman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#707982}
parent 9d582684
......@@ -399,7 +399,7 @@ public class LibraryLoader {
long stopTime = SystemClock.uptimeMillis();
mLibraryLoadTimeMs = stopTime - startTime;
Log.i(TAG, "Time to load native libraries: %d ms", mLibraryLoadTimeMs);
Log.d(TAG, "Time to load native libraries: %d ms", mLibraryLoadTimeMs);
mLoaded = true;
} catch (UnsatisfiedLinkError e) {
......@@ -497,12 +497,17 @@ public class LibraryLoader {
}
// Check that the version of the library we have loaded matches the version we expect
Log.i(TAG,
"Expected native library version number \"%s\", "
+ "actual native library version number \"%s\"",
NativeLibraries.sVersionNumber, LibraryLoaderJni.get().getVersionNumber());
if (!NativeLibraries.sVersionNumber.equals(LibraryLoaderJni.get().getVersionNumber())) {
Log.e(TAG,
"Expected native library version number \"%s\", "
+ "actual native library version number \"%s\"",
NativeLibraries.sVersionNumber, LibraryLoaderJni.get().getVersionNumber());
throw new ProcessInitException(LoaderErrors.LOADER_ERROR_NATIVE_LIBRARY_WRONG_VERSION);
} else {
// Log the version anyway as this is often helpful, but word it differently so it's
// clear that it isn't an error.
Log.i(TAG, "Loaded native library version number \"%s\"",
NativeLibraries.sVersionNumber);
}
// From now on, keep tracing in sync with native.
......
......@@ -48,8 +48,11 @@ bool LibraryLoaded(JNIEnv* env,
false, // Thread ID
false, // Timestamp
false); // Tick count
VLOG(0) << "Chromium logging enabled: level = " << logging::GetMinLogLevel()
<< ", default verbosity = " << logging::GetVlogVerbosity();
if (logging::GetMinLogLevel() != 0 || logging::GetVlogVerbosity() != 0 ||
DCHECK_IS_ON()) {
VLOG(0) << "Chromium logging enabled: level = " << logging::GetMinLogLevel()
<< ", default verbosity = " << logging::GetVlogVerbosity();
}
return true;
}
......
......@@ -39,7 +39,7 @@ import java.util.List;
*/
@JNINamespace("content")
public class BrowserStartupControllerImpl implements BrowserStartupController {
private static final String TAG = "cr.BrowserStartup";
private static final String TAG = "BrowserStartup";
// Helper constants for {@link #executeEnqueuedCallbacks(int, boolean)}.
@VisibleForTesting
......@@ -430,7 +430,7 @@ public class BrowserStartupControllerImpl implements BrowserStartupController {
@VisibleForTesting
void prepareToStartBrowserProcess(
final boolean singleProcess, final Runnable completionCallback) {
Log.i(TAG, "Initializing chromium process, singleProcess=%b", singleProcess);
Log.d(TAG, "Initializing chromium process, singleProcess=%b", singleProcess);
// This strictmode exception is to cover the case where the browser process is being started
// asynchronously but not in the main browser flow. The main browser flow will trigger
......
......@@ -365,7 +365,7 @@ public final class ChildProcessLauncherHelperImpl {
}
if (sSandboxedChildConnectionAllocator == null) {
Log.w(TAG,
Log.d(TAG,
"Create a new ChildConnectionAllocator with package name = %s,"
+ " sandboxed = true",
packageName);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment