Make DDMS log way less verbose.
All the Log.i() calls were in fact debug logging, so I moved them to Log.d() Change-Id: I47b9cd8e85e630d61506c8c2df3baf245a706e03
This commit is contained in:
@@ -138,7 +138,7 @@ public class DeviceCommandDialog extends Dialog {
|
|||||||
shell.addListener(SWT.Close, new Listener() {
|
shell.addListener(SWT.Close, new Listener() {
|
||||||
public void handleEvent(Event event) {
|
public void handleEvent(Event event) {
|
||||||
if (!mFinished) {
|
if (!mFinished) {
|
||||||
Log.i("ddms", "NOT closing - cancelling command");
|
Log.d("ddms", "NOT closing - cancelling command");
|
||||||
event.doit = false;
|
event.doit = false;
|
||||||
mCancel = true;
|
mCancel = true;
|
||||||
}
|
}
|
||||||
@@ -354,7 +354,7 @@ public class DeviceCommandDialog extends Dialog {
|
|||||||
PrefsDialog.getStore().setValue("lastTextSaveDir",
|
PrefsDialog.getStore().setValue("lastTextSaveDir",
|
||||||
dlg.getFilterPath());
|
dlg.getFilterPath());
|
||||||
|
|
||||||
Log.i("ddms", "Saving output to " + fileName);
|
Log.d("ddms", "Saving output to " + fileName);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Convert to 8-bit characters.
|
* Convert to 8-bit characters.
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ public class DropdownSelectionListener extends SelectionAdapter {
|
|||||||
mMenu.setVisible(true);
|
mMenu.setVisible(true);
|
||||||
} else {
|
} else {
|
||||||
// button clicked
|
// button clicked
|
||||||
Log.i("ddms", mDropdown.getText() + " Pressed");
|
Log.d("ddms", mDropdown.getText() + " Pressed");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -613,7 +613,7 @@ final class AdbHelper {
|
|||||||
} else if (count == 0) {
|
} else if (count == 0) {
|
||||||
// TODO: need more accurate timeout?
|
// TODO: need more accurate timeout?
|
||||||
if (timeout != 0 && numWaits * WAIT_TIME > timeout) {
|
if (timeout != 0 && numWaits * WAIT_TIME > timeout) {
|
||||||
Log.i("ddms", "read: timeout");
|
Log.d("ddms", "read: timeout");
|
||||||
throw new IOException("timeout");
|
throw new IOException("timeout");
|
||||||
}
|
}
|
||||||
// non-blocking spin
|
// non-blocking spin
|
||||||
@@ -670,7 +670,7 @@ final class AdbHelper {
|
|||||||
} else if (count == 0) {
|
} else if (count == 0) {
|
||||||
// TODO: need more accurate timeout?
|
// TODO: need more accurate timeout?
|
||||||
if (timeout != 0 && numWaits * WAIT_TIME > timeout) {
|
if (timeout != 0 && numWaits * WAIT_TIME > timeout) {
|
||||||
Log.i("ddms", "write: timeout");
|
Log.d("ddms", "write: timeout");
|
||||||
throw new IOException("timeout");
|
throw new IOException("timeout");
|
||||||
}
|
}
|
||||||
// non-blocking spin
|
// non-blocking spin
|
||||||
|
|||||||
@@ -541,7 +541,7 @@ public class Client {
|
|||||||
Debugger dbg = mDebugger;
|
Debugger dbg = mDebugger;
|
||||||
|
|
||||||
if (dbg == null) {
|
if (dbg == null) {
|
||||||
Log.i("ddms", "Discarding packet");
|
Log.d("ddms", "Discarding packet");
|
||||||
packet.consume();
|
packet.consume();
|
||||||
} else {
|
} else {
|
||||||
dbg.sendAndConsume(packet);
|
dbg.sendAndConsume(packet);
|
||||||
@@ -614,7 +614,7 @@ public class Client {
|
|||||||
//Log.v("ddms", "findHand: " + result);
|
//Log.v("ddms", "findHand: " + result);
|
||||||
switch (result) {
|
switch (result) {
|
||||||
case JdwpPacket.HANDSHAKE_GOOD:
|
case JdwpPacket.HANDSHAKE_GOOD:
|
||||||
Log.i("ddms",
|
Log.d("ddms",
|
||||||
"Good handshake from client, sending HELO to " + mClientData.getPid());
|
"Good handshake from client, sending HELO to " + mClientData.getPid());
|
||||||
JdwpPacket.consumeHandshake(mReadBuffer);
|
JdwpPacket.consumeHandshake(mReadBuffer);
|
||||||
mConnState = ST_NEED_DDM_PKT;
|
mConnState = ST_NEED_DDM_PKT;
|
||||||
@@ -622,7 +622,7 @@ public class Client {
|
|||||||
// see if we have another packet in the buffer
|
// see if we have another packet in the buffer
|
||||||
return getJdwpPacket();
|
return getJdwpPacket();
|
||||||
case JdwpPacket.HANDSHAKE_BAD:
|
case JdwpPacket.HANDSHAKE_BAD:
|
||||||
Log.i("ddms", "Bad handshake from client");
|
Log.d("ddms", "Bad handshake from client");
|
||||||
if (MonitorThread.getInstance().getRetryOnBadHandshake()) {
|
if (MonitorThread.getInstance().getRetryOnBadHandshake()) {
|
||||||
// we should drop the client, but also attempt to reopen it.
|
// we should drop the client, but also attempt to reopen it.
|
||||||
// This is done by the DeviceMonitor.
|
// This is done by the DeviceMonitor.
|
||||||
@@ -635,7 +635,7 @@ public class Client {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case JdwpPacket.HANDSHAKE_NOTYET:
|
case JdwpPacket.HANDSHAKE_NOTYET:
|
||||||
Log.i("ddms", "No handshake from client yet.");
|
Log.d("ddms", "No handshake from client yet.");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Log.e("ddms", "Unknown packet while waiting for client handshake");
|
Log.e("ddms", "Unknown packet while waiting for client handshake");
|
||||||
@@ -713,7 +713,7 @@ public class Client {
|
|||||||
*/
|
*/
|
||||||
void packetFailed(JdwpPacket reply) {
|
void packetFailed(JdwpPacket reply) {
|
||||||
if (mConnState == ST_NEED_DDM_PKT) {
|
if (mConnState == ST_NEED_DDM_PKT) {
|
||||||
Log.i("ddms", "Marking " + this + " as non-DDM client");
|
Log.d("ddms", "Marking " + this + " as non-DDM client");
|
||||||
mConnState = ST_NOT_DDM;
|
mConnState = ST_NOT_DDM;
|
||||||
} else if (mConnState != ST_NOT_DDM) {
|
} else if (mConnState != ST_NOT_DDM) {
|
||||||
Log.w("ddms", "WEIRD: got JDWP failure packet on DDM req");
|
Log.w("ddms", "WEIRD: got JDWP failure packet on DDM req");
|
||||||
@@ -751,7 +751,7 @@ public class Client {
|
|||||||
* @param notify Whether or not to notify the listeners of a change.
|
* @param notify Whether or not to notify the listeners of a change.
|
||||||
*/
|
*/
|
||||||
void close(boolean notify) {
|
void close(boolean notify) {
|
||||||
Log.i("ddms", "Closing " + this.toString());
|
Log.d("ddms", "Closing " + this.toString());
|
||||||
|
|
||||||
mOutstandingReqs.clear();
|
mOutstandingReqs.clear();
|
||||||
|
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ class Debugger {
|
|||||||
mPreDataBuffer = ByteBuffer.allocate(PRE_DATA_BUF_SIZE);
|
mPreDataBuffer = ByteBuffer.allocate(PRE_DATA_BUF_SIZE);
|
||||||
mConnState = ST_NOT_CONNECTED;
|
mConnState = ST_NOT_CONNECTED;
|
||||||
|
|
||||||
Log.i("ddms", "Created: " + this.toString());
|
Log.d("ddms", "Created: " + this.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -243,7 +243,7 @@ class Debugger {
|
|||||||
//Log.v("ddms", "findHand: " + result);
|
//Log.v("ddms", "findHand: " + result);
|
||||||
switch (result) {
|
switch (result) {
|
||||||
case JdwpPacket.HANDSHAKE_GOOD:
|
case JdwpPacket.HANDSHAKE_GOOD:
|
||||||
Log.i("ddms", "Good handshake from debugger");
|
Log.d("ddms", "Good handshake from debugger");
|
||||||
JdwpPacket.consumeHandshake(mReadBuffer);
|
JdwpPacket.consumeHandshake(mReadBuffer);
|
||||||
sendHandshake();
|
sendHandshake();
|
||||||
mConnState = ST_READY;
|
mConnState = ST_READY;
|
||||||
@@ -256,7 +256,7 @@ class Debugger {
|
|||||||
return getJdwpPacket();
|
return getJdwpPacket();
|
||||||
case JdwpPacket.HANDSHAKE_BAD:
|
case JdwpPacket.HANDSHAKE_BAD:
|
||||||
// not a debugger, throw an exception so we drop the line
|
// not a debugger, throw an exception so we drop the line
|
||||||
Log.i("ddms", "Bad handshake from debugger");
|
Log.d("ddms", "Bad handshake from debugger");
|
||||||
throw new IOException("bad handshake");
|
throw new IOException("bad handshake");
|
||||||
case JdwpPacket.HANDSHAKE_NOTYET:
|
case JdwpPacket.HANDSHAKE_NOTYET:
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -438,14 +438,14 @@ final class Device implements IDevice {
|
|||||||
String packageFileName = getFileName(localFilePath);
|
String packageFileName = getFileName(localFilePath);
|
||||||
String remoteFilePath = String.format("/data/local/tmp/%1$s", packageFileName); //$NON-NLS-1$
|
String remoteFilePath = String.format("/data/local/tmp/%1$s", packageFileName); //$NON-NLS-1$
|
||||||
|
|
||||||
Log.i(packageFileName, String.format("Uploading %1$s onto device '%2$s'",
|
Log.d(packageFileName, String.format("Uploading %1$s onto device '%2$s'",
|
||||||
packageFileName, getSerialNumber()));
|
packageFileName, getSerialNumber()));
|
||||||
|
|
||||||
SyncService sync = getSyncService();
|
SyncService sync = getSyncService();
|
||||||
if (sync != null) {
|
if (sync != null) {
|
||||||
String message = String.format("Uploading file onto device '%1$s'",
|
String message = String.format("Uploading file onto device '%1$s'",
|
||||||
getSerialNumber());
|
getSerialNumber());
|
||||||
Log.i(LOG_TAG, message);
|
Log.d(LOG_TAG, message);
|
||||||
SyncResult result = sync.pushFile(localFilePath, remoteFilePath,
|
SyncResult result = sync.pushFile(localFilePath, remoteFilePath,
|
||||||
SyncService.getNullProgressMonitor());
|
SyncService.getNullProgressMonitor());
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ final class HandleAppName extends ChunkHandler {
|
|||||||
appNameLen = data.getInt();
|
appNameLen = data.getInt();
|
||||||
appName = getString(data, appNameLen);
|
appName = getString(data, appNameLen);
|
||||||
|
|
||||||
Log.i("ddm-appname", "APNM: app='" + appName + "'");
|
Log.d("ddm-appname", "APNM: app='" + appName + "'");
|
||||||
|
|
||||||
ClientData cd = client.getClientData();
|
ClientData cd = client.getClientData();
|
||||||
synchronized (cd) {
|
synchronized (cd) {
|
||||||
|
|||||||
@@ -267,7 +267,7 @@ final class HandleHeap extends ChunkHandler {
|
|||||||
if (result == 0) {
|
if (result == 0) {
|
||||||
handler.onSuccess(filename, client);
|
handler.onSuccess(filename, client);
|
||||||
|
|
||||||
Log.i("ddm-heap", "Heap dump request has finished");
|
Log.d("ddm-heap", "Heap dump request has finished");
|
||||||
} else {
|
} else {
|
||||||
handler.onFailure(client);
|
handler.onFailure(client);
|
||||||
Log.w("ddm-heap", "Heap dump request failed (check device log)");
|
Log.w("ddm-heap", "Heap dump request failed (check device log)");
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ final class HandleProfiling extends ChunkHandler {
|
|||||||
result = data.get();
|
result = data.get();
|
||||||
|
|
||||||
if (result == 0) {
|
if (result == 0) {
|
||||||
Log.i("ddm-prof", "Method profiling has finished");
|
Log.d("ddm-prof", "Method profiling has finished");
|
||||||
} else {
|
} else {
|
||||||
Log.w("ddm-prof", "Method profiling has failed (check device log)");
|
Log.w("ddm-prof", "Method profiling has failed (check device log)");
|
||||||
}
|
}
|
||||||
@@ -157,9 +157,9 @@ final class HandleProfiling extends ChunkHandler {
|
|||||||
result = data.get();
|
result = data.get();
|
||||||
|
|
||||||
if (result == 0) {
|
if (result == 0) {
|
||||||
Log.i("ddm-prof", "Method profiling is not running");
|
Log.d("ddm-prof", "Method profiling is not running");
|
||||||
} else {
|
} else {
|
||||||
Log.i("ddm-prof", "Method profiling is running");
|
Log.d("ddm-prof", "Method profiling is running");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ final class HandleThread extends ChunkHandler {
|
|||||||
if (threadInfo != null)
|
if (threadInfo != null)
|
||||||
threadInfo.updateThread(status, tid, utime, stime, isDaemon);
|
threadInfo.updateThread(status, tid, utime, stime, isDaemon);
|
||||||
else
|
else
|
||||||
Log.i("ddms", "Thread with id=" + threadId + " not found");
|
Log.d("ddms", "Thread with id=" + threadId + " not found");
|
||||||
|
|
||||||
// slurp up any extra
|
// slurp up any extra
|
||||||
for (int slurp = extraPerEntry; slurp > 0; slurp--)
|
for (int slurp = extraPerEntry; slurp > 0; slurp--)
|
||||||
@@ -207,7 +207,7 @@ final class HandleThread extends ChunkHandler {
|
|||||||
threadInfo.setThreadName(name);
|
threadInfo.setThreadName(name);
|
||||||
client.update(Client.CHANGE_THREAD_DATA);
|
client.update(Client.CHANGE_THREAD_DATA);
|
||||||
} else {
|
} else {
|
||||||
Log.i("ddms", "Thread with id=" + threadId + " not found");
|
Log.d("ddms", "Thread with id=" + threadId + " not found");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -291,7 +291,7 @@ final class HandleThread extends ChunkHandler {
|
|||||||
throws IOException {
|
throws IOException {
|
||||||
|
|
||||||
if (false) {
|
if (false) {
|
||||||
Log.i("ddm-thread", "would send STKL " + threadId);
|
Log.d("ddm-thread", "would send STKL " + threadId);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -326,7 +326,7 @@ final class HandleThread extends ChunkHandler {
|
|||||||
try {
|
try {
|
||||||
sendTHST(client);
|
sendTHST(client);
|
||||||
} catch (IOException ioe) {
|
} catch (IOException ioe) {
|
||||||
Log.i("ddms", "Unable to request thread updates from "
|
Log.d("ddms", "Unable to request thread updates from "
|
||||||
+ client + ": " + ioe.getMessage());
|
+ client + ": " + ioe.getMessage());
|
||||||
} finally {
|
} finally {
|
||||||
mThreadStatusReqRunning = false;
|
mThreadStatusReqRunning = false;
|
||||||
@@ -350,7 +350,7 @@ final class HandleThread extends ChunkHandler {
|
|||||||
try {
|
try {
|
||||||
sendSTKL(client, threadId);
|
sendSTKL(client, threadId);
|
||||||
} catch (IOException ioe) {
|
} catch (IOException ioe) {
|
||||||
Log.i("ddms", "Unable to request thread stack call updates from "
|
Log.d("ddms", "Unable to request thread stack call updates from "
|
||||||
+ client + ": " + ioe.getMessage());
|
+ client + ": " + ioe.getMessage());
|
||||||
} finally {
|
} finally {
|
||||||
mThreadStackTraceReqRunning = false;
|
mThreadStackTraceReqRunning = false;
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ final class HandleWait extends ChunkHandler {
|
|||||||
|
|
||||||
reason = data.get();
|
reason = data.get();
|
||||||
|
|
||||||
Log.i("ddm-wait", "WAIT: reason=" + reason);
|
Log.d("ddm-wait", "WAIT: reason=" + reason);
|
||||||
|
|
||||||
|
|
||||||
ClientData cd = client.getClientData();
|
ClientData cd = client.getClientData();
|
||||||
|
|||||||
@@ -499,7 +499,7 @@ final class MonitorThread extends Thread {
|
|||||||
throw re;
|
throw re;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Log.i("ddms", "ignoring duplicate debugger");
|
Log.w("ddms", "ignoring duplicate debugger");
|
||||||
// new connection already closed
|
// new connection already closed
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -542,19 +542,19 @@ final class MonitorThread extends Thread {
|
|||||||
* this won't be necessary, and we can just send a "debugger
|
* this won't be necessary, and we can just send a "debugger
|
||||||
* disconnected" message.
|
* disconnected" message.
|
||||||
*/
|
*/
|
||||||
Log.i("ddms", "Closing connection to debugger " + dbg);
|
Log.d("ddms", "Closing connection to debugger " + dbg);
|
||||||
dbg.closeData();
|
dbg.closeData();
|
||||||
Client client = dbg.getClient();
|
Client client = dbg.getClient();
|
||||||
if (client.isDdmAware()) {
|
if (client.isDdmAware()) {
|
||||||
// TODO: soft-disconnect DDM-aware clients
|
// TODO: soft-disconnect DDM-aware clients
|
||||||
Log.i("ddms", " (recycling client connection as well)");
|
Log.d("ddms", " (recycling client connection as well)");
|
||||||
|
|
||||||
// we should drop the client, but also attempt to reopen it.
|
// we should drop the client, but also attempt to reopen it.
|
||||||
// This is done by the DeviceMonitor.
|
// This is done by the DeviceMonitor.
|
||||||
client.getDeviceImpl().getMonitor().addClientToDropAndReopen(client,
|
client.getDeviceImpl().getMonitor().addClientToDropAndReopen(client,
|
||||||
IDebugPortProvider.NO_STATIC_PORT);
|
IDebugPortProvider.NO_STATIC_PORT);
|
||||||
} else {
|
} else {
|
||||||
Log.i("ddms", " (recycling client connection as well)");
|
Log.d("ddms", " (recycling client connection as well)");
|
||||||
// we should drop the client, but also attempt to reopen it.
|
// we should drop the client, but also attempt to reopen it.
|
||||||
// This is done by the DeviceMonitor.
|
// This is done by the DeviceMonitor.
|
||||||
client.getDeviceImpl().getMonitor().addClientToDropAndReopen(client,
|
client.getDeviceImpl().getMonitor().addClientToDropAndReopen(client,
|
||||||
@@ -747,7 +747,7 @@ final class MonitorThread extends Thread {
|
|||||||
Debugger dbg = mSelectedClient.getDebugger();
|
Debugger dbg = mSelectedClient.getDebugger();
|
||||||
|
|
||||||
if (dbg != null) {
|
if (dbg != null) {
|
||||||
Log.i("ddms", "Accepting connection on 'debug selected' port");
|
Log.d("ddms", "Accepting connection on 'debug selected' port");
|
||||||
try {
|
try {
|
||||||
acceptNewDebugger(dbg, acceptChan);
|
acceptNewDebugger(dbg, acceptChan);
|
||||||
} catch (IOException ioe) {
|
} catch (IOException ioe) {
|
||||||
|
|||||||
@@ -229,7 +229,7 @@ public class ScreenShotDialog extends Dialog {
|
|||||||
if (fileName != null) {
|
if (fileName != null) {
|
||||||
DdmUiPreferences.getStore().setValue("lastImageSaveDir", dlg.getFilterPath());
|
DdmUiPreferences.getStore().setValue("lastImageSaveDir", dlg.getFilterPath());
|
||||||
|
|
||||||
Log.i("ddms", "Saving image to " + fileName);
|
Log.d("ddms", "Saving image to " + fileName);
|
||||||
ImageData imageData = mImageLabel.getImage().getImageData();
|
ImageData imageData = mImageLabel.getImage().getImageData();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ public class WritePng {
|
|||||||
int height = imageData.height;
|
int height = imageData.height;
|
||||||
byte[] out24;
|
byte[] out24;
|
||||||
|
|
||||||
Log.i("ddms-png", "Convert to 24bit from " + imageData.depth);
|
Log.d("ddms-png", "Convert to 24bit from " + imageData.depth);
|
||||||
|
|
||||||
if (imageData.depth == 24 || imageData.depth == 32) {
|
if (imageData.depth == 24 || imageData.depth == 32) {
|
||||||
out24 = convertTo24ForPng(imageData.data, width, height,
|
out24 = convertTo24ForPng(imageData.data, width, height,
|
||||||
|
|||||||
Reference in New Issue
Block a user