am 46093a92: Make DDMS log way less verbose.
Merge commit '46093a9204309a241b4e83dca4b7fbcba8768959' into eclair-plus-aosp * commit '46093a9204309a241b4e83dca4b7fbcba8768959': Make DDMS log way less verbose.
This commit is contained in:
@@ -138,7 +138,7 @@ public class DeviceCommandDialog extends Dialog {
|
||||
shell.addListener(SWT.Close, new Listener() {
|
||||
public void handleEvent(Event event) {
|
||||
if (!mFinished) {
|
||||
Log.i("ddms", "NOT closing - cancelling command");
|
||||
Log.d("ddms", "NOT closing - cancelling command");
|
||||
event.doit = false;
|
||||
mCancel = true;
|
||||
}
|
||||
@@ -354,7 +354,7 @@ public class DeviceCommandDialog extends Dialog {
|
||||
PrefsDialog.getStore().setValue("lastTextSaveDir",
|
||||
dlg.getFilterPath());
|
||||
|
||||
Log.i("ddms", "Saving output to " + fileName);
|
||||
Log.d("ddms", "Saving output to " + fileName);
|
||||
|
||||
/*
|
||||
* Convert to 8-bit characters.
|
||||
|
||||
@@ -73,7 +73,7 @@ public class DropdownSelectionListener extends SelectionAdapter {
|
||||
mMenu.setVisible(true);
|
||||
} else {
|
||||
// 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) {
|
||||
// TODO: need more accurate timeout?
|
||||
if (timeout != 0 && numWaits * WAIT_TIME > timeout) {
|
||||
Log.i("ddms", "read: timeout");
|
||||
Log.d("ddms", "read: timeout");
|
||||
throw new IOException("timeout");
|
||||
}
|
||||
// non-blocking spin
|
||||
@@ -670,7 +670,7 @@ final class AdbHelper {
|
||||
} else if (count == 0) {
|
||||
// TODO: need more accurate timeout?
|
||||
if (timeout != 0 && numWaits * WAIT_TIME > timeout) {
|
||||
Log.i("ddms", "write: timeout");
|
||||
Log.d("ddms", "write: timeout");
|
||||
throw new IOException("timeout");
|
||||
}
|
||||
// non-blocking spin
|
||||
|
||||
@@ -541,7 +541,7 @@ public class Client {
|
||||
Debugger dbg = mDebugger;
|
||||
|
||||
if (dbg == null) {
|
||||
Log.i("ddms", "Discarding packet");
|
||||
Log.d("ddms", "Discarding packet");
|
||||
packet.consume();
|
||||
} else {
|
||||
dbg.sendAndConsume(packet);
|
||||
@@ -614,7 +614,7 @@ public class Client {
|
||||
//Log.v("ddms", "findHand: " + result);
|
||||
switch (result) {
|
||||
case JdwpPacket.HANDSHAKE_GOOD:
|
||||
Log.i("ddms",
|
||||
Log.d("ddms",
|
||||
"Good handshake from client, sending HELO to " + mClientData.getPid());
|
||||
JdwpPacket.consumeHandshake(mReadBuffer);
|
||||
mConnState = ST_NEED_DDM_PKT;
|
||||
@@ -622,7 +622,7 @@ public class Client {
|
||||
// see if we have another packet in the buffer
|
||||
return getJdwpPacket();
|
||||
case JdwpPacket.HANDSHAKE_BAD:
|
||||
Log.i("ddms", "Bad handshake from client");
|
||||
Log.d("ddms", "Bad handshake from client");
|
||||
if (MonitorThread.getInstance().getRetryOnBadHandshake()) {
|
||||
// we should drop the client, but also attempt to reopen it.
|
||||
// This is done by the DeviceMonitor.
|
||||
@@ -635,7 +635,7 @@ public class Client {
|
||||
}
|
||||
break;
|
||||
case JdwpPacket.HANDSHAKE_NOTYET:
|
||||
Log.i("ddms", "No handshake from client yet.");
|
||||
Log.d("ddms", "No handshake from client yet.");
|
||||
break;
|
||||
default:
|
||||
Log.e("ddms", "Unknown packet while waiting for client handshake");
|
||||
@@ -713,7 +713,7 @@ public class Client {
|
||||
*/
|
||||
void packetFailed(JdwpPacket reply) {
|
||||
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;
|
||||
} else if (mConnState != ST_NOT_DDM) {
|
||||
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.
|
||||
*/
|
||||
void close(boolean notify) {
|
||||
Log.i("ddms", "Closing " + this.toString());
|
||||
Log.d("ddms", "Closing " + this.toString());
|
||||
|
||||
mOutstandingReqs.clear();
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ class Debugger {
|
||||
mPreDataBuffer = ByteBuffer.allocate(PRE_DATA_BUF_SIZE);
|
||||
mConnState = ST_NOT_CONNECTED;
|
||||
|
||||
Log.i("ddms", "Created: " + this.toString());
|
||||
Log.d("ddms", "Created: " + this.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -137,7 +137,7 @@ class Debugger {
|
||||
|
||||
if (listenChan != null) {
|
||||
SocketChannel newChan;
|
||||
|
||||
|
||||
newChan = listenChan.accept();
|
||||
if (mChannel != null) {
|
||||
Log.w("ddms", "debugger already talking to " + mClient
|
||||
@@ -150,7 +150,7 @@ class Debugger {
|
||||
mConnState = ST_AWAIT_SHAKE;
|
||||
return mChannel;
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -243,7 +243,7 @@ class Debugger {
|
||||
//Log.v("ddms", "findHand: " + result);
|
||||
switch (result) {
|
||||
case JdwpPacket.HANDSHAKE_GOOD:
|
||||
Log.i("ddms", "Good handshake from debugger");
|
||||
Log.d("ddms", "Good handshake from debugger");
|
||||
JdwpPacket.consumeHandshake(mReadBuffer);
|
||||
sendHandshake();
|
||||
mConnState = ST_READY;
|
||||
@@ -256,7 +256,7 @@ class Debugger {
|
||||
return getJdwpPacket();
|
||||
case JdwpPacket.HANDSHAKE_BAD:
|
||||
// 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");
|
||||
case JdwpPacket.HANDSHAKE_NOTYET:
|
||||
break;
|
||||
@@ -272,7 +272,7 @@ class Debugger {
|
||||
} else {
|
||||
Log.e("ddms", "Receiving data in state = " + mConnState);
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -438,14 +438,14 @@ final class Device implements IDevice {
|
||||
String packageFileName = getFileName(localFilePath);
|
||||
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()));
|
||||
|
||||
SyncService sync = getSyncService();
|
||||
if (sync != null) {
|
||||
String message = String.format("Uploading file onto device '%1$s'",
|
||||
getSerialNumber());
|
||||
Log.i(LOG_TAG, message);
|
||||
Log.d(LOG_TAG, message);
|
||||
SyncResult result = sync.pushFile(localFilePath, remoteFilePath,
|
||||
SyncService.getNullProgressMonitor());
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ final class HandleAppName extends ChunkHandler {
|
||||
appNameLen = data.getInt();
|
||||
appName = getString(data, appNameLen);
|
||||
|
||||
Log.i("ddm-appname", "APNM: app='" + appName + "'");
|
||||
Log.d("ddm-appname", "APNM: app='" + appName + "'");
|
||||
|
||||
ClientData cd = client.getClientData();
|
||||
synchronized (cd) {
|
||||
|
||||
@@ -267,7 +267,7 @@ final class HandleHeap extends ChunkHandler {
|
||||
if (result == 0) {
|
||||
handler.onSuccess(filename, client);
|
||||
|
||||
Log.i("ddm-heap", "Heap dump request has finished");
|
||||
Log.d("ddm-heap", "Heap dump request has finished");
|
||||
} else {
|
||||
handler.onFailure(client);
|
||||
Log.w("ddm-heap", "Heap dump request failed (check device log)");
|
||||
|
||||
@@ -125,7 +125,7 @@ final class HandleProfiling extends ChunkHandler {
|
||||
result = data.get();
|
||||
|
||||
if (result == 0) {
|
||||
Log.i("ddm-prof", "Method profiling has finished");
|
||||
Log.d("ddm-prof", "Method profiling has finished");
|
||||
} else {
|
||||
Log.w("ddm-prof", "Method profiling has failed (check device log)");
|
||||
}
|
||||
@@ -157,9 +157,9 @@ final class HandleProfiling extends ChunkHandler {
|
||||
result = data.get();
|
||||
|
||||
if (result == 0) {
|
||||
Log.i("ddm-prof", "Method profiling is not running");
|
||||
Log.d("ddm-prof", "Method profiling is not running");
|
||||
} else {
|
||||
Log.i("ddm-prof", "Method profiling is running");
|
||||
Log.d("ddm-prof", "Method profiling is running");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,13 +178,13 @@ final class HandleThread extends ChunkHandler {
|
||||
if (threadInfo != null)
|
||||
threadInfo.updateThread(status, tid, utime, stime, isDaemon);
|
||||
else
|
||||
Log.i("ddms", "Thread with id=" + threadId + " not found");
|
||||
Log.d("ddms", "Thread with id=" + threadId + " not found");
|
||||
|
||||
// slurp up any extra
|
||||
for (int slurp = extraPerEntry; slurp > 0; slurp--)
|
||||
data.get();
|
||||
}
|
||||
|
||||
|
||||
client.update(Client.CHANGE_THREAD_DATA);
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@ final class HandleThread extends ChunkHandler {
|
||||
threadInfo.setThreadName(name);
|
||||
client.update(Client.CHANGE_THREAD_DATA);
|
||||
} 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 {
|
||||
|
||||
if (false) {
|
||||
Log.i("ddm-thread", "would send STKL " + threadId);
|
||||
Log.d("ddm-thread", "would send STKL " + threadId);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -326,7 +326,7 @@ final class HandleThread extends ChunkHandler {
|
||||
try {
|
||||
sendTHST(client);
|
||||
} catch (IOException ioe) {
|
||||
Log.i("ddms", "Unable to request thread updates from "
|
||||
Log.d("ddms", "Unable to request thread updates from "
|
||||
+ client + ": " + ioe.getMessage());
|
||||
} finally {
|
||||
mThreadStatusReqRunning = false;
|
||||
@@ -335,7 +335,7 @@ final class HandleThread extends ChunkHandler {
|
||||
}.start();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void requestThreadStackCallRefresh(final Client client, final int threadId) {
|
||||
if (client.isDdmAware() && client.isThreadUpdateEnabled()) {
|
||||
if (mThreadStackTraceReqRunning ) {
|
||||
@@ -350,7 +350,7 @@ final class HandleThread extends ChunkHandler {
|
||||
try {
|
||||
sendSTKL(client, threadId);
|
||||
} 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());
|
||||
} finally {
|
||||
mThreadStackTraceReqRunning = false;
|
||||
@@ -358,7 +358,7 @@ final class HandleThread extends ChunkHandler {
|
||||
}
|
||||
}.start();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -75,7 +75,7 @@ final class HandleWait extends ChunkHandler {
|
||||
|
||||
reason = data.get();
|
||||
|
||||
Log.i("ddm-wait", "WAIT: reason=" + reason);
|
||||
Log.d("ddm-wait", "WAIT: reason=" + reason);
|
||||
|
||||
|
||||
ClientData cd = client.getClientData();
|
||||
|
||||
@@ -499,7 +499,7 @@ final class MonitorThread extends Thread {
|
||||
throw re;
|
||||
}
|
||||
} else {
|
||||
Log.i("ddms", "ignoring duplicate debugger");
|
||||
Log.w("ddms", "ignoring duplicate debugger");
|
||||
// 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
|
||||
* disconnected" message.
|
||||
*/
|
||||
Log.i("ddms", "Closing connection to debugger " + dbg);
|
||||
Log.d("ddms", "Closing connection to debugger " + dbg);
|
||||
dbg.closeData();
|
||||
Client client = dbg.getClient();
|
||||
if (client.isDdmAware()) {
|
||||
// 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.
|
||||
// This is done by the DeviceMonitor.
|
||||
client.getDeviceImpl().getMonitor().addClientToDropAndReopen(client,
|
||||
IDebugPortProvider.NO_STATIC_PORT);
|
||||
} 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.
|
||||
// This is done by the DeviceMonitor.
|
||||
client.getDeviceImpl().getMonitor().addClientToDropAndReopen(client,
|
||||
@@ -747,7 +747,7 @@ final class MonitorThread extends Thread {
|
||||
Debugger dbg = mSelectedClient.getDebugger();
|
||||
|
||||
if (dbg != null) {
|
||||
Log.i("ddms", "Accepting connection on 'debug selected' port");
|
||||
Log.d("ddms", "Accepting connection on 'debug selected' port");
|
||||
try {
|
||||
acceptNewDebugger(dbg, acceptChan);
|
||||
} catch (IOException ioe) {
|
||||
|
||||
@@ -229,7 +229,7 @@ public class ScreenShotDialog extends Dialog {
|
||||
if (fileName != null) {
|
||||
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();
|
||||
|
||||
try {
|
||||
|
||||
@@ -68,7 +68,7 @@ public class WritePng {
|
||||
int height = imageData.height;
|
||||
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) {
|
||||
out24 = convertTo24ForPng(imageData.data, width, height,
|
||||
|
||||
Reference in New Issue
Block a user