FileDocCategorySizeDatePackage
ImpsLog.javaAPI DocAndroid 1.5 API2803Wed May 06 22:42:46 BST 2009com.android.im.imps

ImpsLog

public 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 voiddumpPrimitive(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 voiddumpRawPacket(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 voidlog(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 voidlog(java.lang.String info)

        if(DEBUG) {
            Log.d(TAG, /* DateFormat.format("kk:mm:ss ", new Date()) + */ info);
        }
    
public static voidlogError(java.lang.Throwable t)

        Log.e(TAG, /* DateFormat.format("kk:mm:ss", new Date()).toString() */ "", t);
    
public static voidlogError(java.lang.String info, java.lang.Throwable t)

        Log.e(TAG, /* DateFormat.format("kk:mm:ss ", new Date()) + */ info, t);
    
public static voidlogError(java.lang.String info)

        Log.e(TAG, /* DateFormat.format("kk:mm:ss ", new Date()) + */ info);