ImpsLogpublic class ImpsLog extends Object
Fields Summary |
---|
public static final String | TAG | public static final String | PACKET_TAG | public static final boolean | DEBUG | private static PrimitiveSerializer | mSerialzier |
Constructors Summary |
---|
private ImpsLog()
|
Methods Summary |
---|
public static void | dumpPrimitive(Primitive p)
ByteArrayOutputStream out = new ByteArrayOutputStream();
try {
mSerialzier.serialize(p, out);
} catch (IOException e) {
Log.e(PACKET_TAG, "Bad Primitive");
} catch (SerializerException e) {
Log.e(PACKET_TAG, "Bad Primitive");
}
Log.d(PACKET_TAG, out.toString());
| public static void | dumpRawPacket(byte[] bytes)
// we don't really care about the namespace values in the log
mSerialzier = new XmlPrimitiveSerializer("", "");
Log.d(PACKET_TAG, HexDump.dumpHexString(bytes));
| public static void | log(Primitive primitive)
if(DEBUG) {
ByteArrayOutputStream out = new ByteArrayOutputStream();
try {
mSerialzier.serialize(primitive, out);
} catch (IOException e) {
Log.e(TAG, e.getMessage(), e);
} catch (SerializerException e) {
Log.e(TAG, e.getMessage(), e);
}
Log.i(TAG, out.toString());
}
| public static void | log(java.lang.String info)
if(DEBUG) {
Log.d(TAG, /* DateFormat.format("kk:mm:ss ", new Date()) + */ info);
}
| public static void | logError(java.lang.Throwable t)
Log.e(TAG, /* DateFormat.format("kk:mm:ss", new Date()).toString() */ "", t);
| public static void | logError(java.lang.String info, java.lang.Throwable t)
Log.e(TAG, /* DateFormat.format("kk:mm:ss ", new Date()) + */ info, t);
| public static void | logError(java.lang.String info)
Log.e(TAG, /* DateFormat.format("kk:mm:ss ", new Date()) + */ info);
|
|