当前位置: 首页>>代码示例>>Java>>正文


Java Log.wtf方法代码示例

本文整理汇总了Java中android.util.Log.wtf方法的典型用法代码示例。如果您正苦于以下问题:Java Log.wtf方法的具体用法?Java Log.wtf怎么用?Java Log.wtf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.util.Log的用法示例。


在下文中一共展示了Log.wtf方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getBytes

import android.util.Log; //导入方法依赖的package包/类
byte[] getBytes(int elements) {
    if (elements > mSize) {
        Log.wtf(TAG, "Asking for more elements than we have in the buffer." +
                " Buffer size: " + mSize + ", elements requested: " + elements);
        return new byte[]{};
    }

    int virtualPosition = mCurrentIndex - elements;
    if (virtualPosition >= 0) {
        return Arrays.copyOfRange(mBuffer, virtualPosition, mCurrentIndex);
    } else {
        byte[] head = Arrays.copyOfRange(mBuffer, mSize + virtualPosition, mSize);
        if (mCurrentIndex == 0) {
            return head;
        }

        byte[] tail = Arrays.copyOfRange(mBuffer, 0, mCurrentIndex);
        return concatenate(head, tail);
    }
}
 
开发者ID:OpilkiInside,项目名称:bimdroid,代码行数:21,代码来源:BmwIBusService.java

示例2: onHandleIntent

import android.util.Log; //导入方法依赖的package包/类
@Override
protected void onHandleIntent(Intent intent) {

    mReceiver = intent.getParcelableExtra(Constants.RECEIVER);

    // Cek apakah ada receiver untuk menerima hasil
    if (mReceiver == null) {
        Log.wtf(TAG, "Tidak ada receiver, sehingga hasil tidak bisa dikirim");
        return;
    }

    String alamat = intent.getStringExtra(Constants.ADDRESS_DATA_EXTRA);

    if(!TextUtils.isEmpty(alamat)){
        geoCoding(alamat);
    }else{
        reverseGeocoding(intent);
    }
}
 
开发者ID:twoh,项目名称:twoh-places-location-api-sample,代码行数:20,代码来源:GeocoderIntentService.java

示例3: wtf

import android.util.Log; //导入方法依赖的package包/类
public static void wtf(Throwable tr) {
    if (!allowWtf) return;
    StackTraceElement caller = getCallerStackTraceElement();
    String tag = generateTag(caller);

    if (customLogger != null) {
        customLogger.wtf(tag, tr);
    } else {
        Log.wtf(tag, tr);
    }
}
 
开发者ID:LonelyMushroom,项目名称:aarLibrary,代码行数:12,代码来源:LogUtils.java

示例4: run

import android.util.Log; //导入方法依赖的package包/类
@Override
public void run() {
    final byte[] temp = new byte[8192];
    try {
        while (read(mServer, temp, 0, MSG_LENGTH) == MSG_LENGTH) {
            final int cmd = FileUtils.peekInt(temp, 0, ByteOrder.BIG_ENDIAN);
            if (cmd == CMD_WRITE) {
                // Shuttle data into local file
                int len = FileUtils.peekInt(temp, 4, ByteOrder.BIG_ENDIAN);
                while (len > 0) {
                    int n = read(mServer, temp, 0, Math.min(temp.length, len));
                    if (n == -1) {
                        throw new IOException(
                                "Unexpected EOF; still expected " + len + " bytes");
                    }
                    write(mTarget, temp, 0, n);
                    len -= n;
                }

            } else if (cmd == CMD_FSYNC) {
                // Sync and echo back to confirm
                Os.fsync(mTarget);
                write(mServer, temp, 0, MSG_LENGTH);

            } else if (cmd == CMD_CLOSE) {
                // Close and echo back to confirm
                Os.fsync(mTarget);
                Os.close(mTarget);
                mClosed = true;
                write(mServer, temp, 0, MSG_LENGTH);
                break;
            }
        }

    } catch (ErrnoException | IOException e) {
        Log.wtf(TAG, "Failed during bridge", e);
    } finally {
        forceClose();
    }
}
 
开发者ID:codehz,项目名称:container,代码行数:41,代码来源:FileBridge.java

示例5: setSong

import android.util.Log; //导入方法依赖的package包/类
public void setSong(Song song){
    int index = mSongs.indexOf(song);
    // Prevents the case of a song being selected that is not in the mSongs ArrayList (which may
    // occur if the updateSongList method is not invoked before setSong.
    if (index == -1){
        Log.wtf(ERROR_TAG, "song not in index!");
    } else {
        mSongPos = index;
    }
}
 
开发者ID:AkshayPall,项目名称:Songify,代码行数:11,代码来源:PlaybackService.java

示例6: f

import android.util.Log; //导入方法依赖的package包/类
/**
 * Send a FATAL ERROR log message
 *
 * @param tag
 * @param msg
 * @param args
 */
public static void f(String tag, String msg, Object... args) {
    if (sLevel > LEVEL_FATAL) {
        return;
    }
    if (args.length > 0) {
        msg = String.format(msg, args);
    }
    Log.wtf(tag, msg);
}
 
开发者ID:yinyiliang,项目名称:RabbitCloud,代码行数:17,代码来源:PtrCLog.java

示例7: wtf

import android.util.Log; //导入方法依赖的package包/类
public static void wtf(String content, Throwable tr) {
    if (!allowWtf)
        return;
    StackTraceElement caller = getCallerStackTraceElement();
    String tag = generateTag(caller);

    if (customLogger != null) {
        customLogger.wtf(tag, content, tr);
    } else {
        Log.wtf(tag, content, tr);
    }
}
 
开发者ID:gengqifu,项目名称:361Camera,代码行数:13,代码来源:LogUtil.java

示例8: log

import android.util.Log; //导入方法依赖的package包/类
@Override
protected void log(int priority, String tag, String message, Throwable t) {
    if(isLoggable(tag,priority)){

        if(priority == Log.ERROR && t!=null){
            //Send the log to your crashlatics framework
        }

        if(message.length() < MAX_LOG_LENGTH){
            if(priority == Log.ASSERT){
                Log.wtf(tag,message);
            }else {
                Log.println(priority,tag,message);
            }
            return;
        }
    }

    for (int i = 0, length = message.length(); i < length; i++) {
        int newline = message.indexOf('\n', i);
        newline = newline != -1 ? newline : length;
        do {
            int end = Math.min(newline, i + MAX_LOG_LENGTH);
            String part = message.substring(i, end);
            if (priority == Log.ASSERT) {
                Log.wtf(tag, part);
            } else {
                Log.println(priority, tag, part);
            }
            i = end;
        } while (i < newline);
    }

}
 
开发者ID:iamBedant,项目名称:InstantAppStarter,代码行数:35,代码来源:ReleaseTree.java

示例9: onUpgrade

import android.util.Log; //导入方法依赖的package包/类
@Override  
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {  
    // TODO Auto-generated method stub  
    Log.wtf(TAG, "Upgrading database from version "+ oldVersion + "to "+  
     newVersion + ", which will destroy all old data");  
    db.execSQL("DROP TABLE IF EXISTS contacts");  
    onCreate(db);  
}
 
开发者ID:Edward7Zhang,项目名称:oneKey2Alarm,代码行数:9,代码来源:DBAdapter.java

示例10: log

import android.util.Log; //导入方法依赖的package包/类
@Override
protected void log(int priority, String tag, String message, Throwable t) {
    if (message.length() < MAX_LOG_LENGTH) {
        if (priority == Log.ASSERT) {
            Log.wtf(tag, message);
        } else {
            Log.println(priority, tag, message);
        }
        return;
    }

    // Split by line, then ensure each line can fit into Log's maximum length.
    for (int i = 0, length = message.length(); i < length; i++) {
        int newline = message.indexOf('\n', i);
        newline = newline != -1 ? newline : length;
        do {
            int end = Math.min(newline, i + MAX_LOG_LENGTH);
            String part = message.substring(i, end);
            if (priority == Log.ASSERT) {
                Log.wtf(tag, part);
            } else {
                Log.println(priority, tag, part);
            }
            i = end;
        } while (i < newline);
    }
}
 
开发者ID:aprochukhan,项目名称:Android-MVVM-Example,代码行数:28,代码来源:ReleaseTree.java

示例11: log

import android.util.Log; //导入方法依赖的package包/类
/**
 * Break up {@code message} into maximum-length chunks (if needed) and send to either
 * {@link Log#println(int, String, String) Log.println()} or
 * {@link Log#wtf(String, String) Log.wtf()} for logging.
 * <p>
 * {@inheritDoc}
 */
@Override
protected void log(int priority, String tag, String message, Throwable t) {
    if (message.length() < MAX_LOG_LENGTH) {
        if (priority == Log.ASSERT) {
            Log.wtf(tag, message);
        } else {
            Log.println(priority, tag, message);
        }
        return;
    }

    // Split by line, then ensure each line can fit into Log's maximum length.
    for (int i = 0, length = message.length(); i < length; i++) {
        int newline = message.indexOf('\n', i);
        newline = newline != -1 ? newline : length;
        do {
            int end = Math.min(newline, i + MAX_LOG_LENGTH);
            String part = message.substring(i, end);
            if (priority == Log.ASSERT) {
                Log.wtf(tag, part);
            } else {
                Log.println(priority, tag, part);
            }
            i = end;
        } while (i < newline);
    }
}
 
开发者ID:vsona,项目名称:RxJava2RetrofitDemo,代码行数:35,代码来源:Timber.java

示例12: f

import android.util.Log; //导入方法依赖的package包/类
/**
 * Send a FATAL ERROR log message
 *
 * @param tag
 * @param msg
 */
public static void f(String tag, String msg) {
    if (sLevel > LEVEL_FATAL) {
        return;
    }
    Log.wtf(tag, msg);
}
 
开发者ID:sathishmscict,项目名称:android-Ultra-Pull-To-Refresh,代码行数:13,代码来源:PtrCLog.java

示例13: wtf

import android.util.Log; //导入方法依赖的package包/类
public static void wtf(String message) {
    if (IS_LOGGING_ENABLED) {
        Log.wtf(TAG, message);
    }
}
 
开发者ID:balsikandar,项目名称:Android-Studio-Plugins,代码行数:6,代码来源:BLog.java

示例14: logWtf

import android.util.Log; //导入方法依赖的package包/类
@Rpc(description = "Log at WTF level.")
public void logWtf(String message) {
    Log.wtf(mTag, message);
}
 
开发者ID:google,项目名称:mobly-bundled-snippets,代码行数:5,代码来源:LogSnippet.java

示例15: wtf

import android.util.Log; //导入方法依赖的package包/类
public static void wtf(Throwable tr, String format, Object... args) {
    Log.wtf(TAG, buildMessage(format, args), tr);
}
 
开发者ID:wangzhaosheng,项目名称:publicProject,代码行数:4,代码来源:VolleyLog.java


注:本文中的android.util.Log.wtf方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。