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


Java Utils.log方法代码示例

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


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

示例1: getRequest

import com.r0adkll.deadskunk.utils.Utils; //导入方法依赖的package包/类
/**
 * Make a /GET request to the nimbus API server
 * @param target		the target endpoint
 * @param params		the request params
 * @param handler		the async response handler
 */
public static void getRequest(String target, RequestParams params, JsonHttpResponseHandler handler){
    // Get Fully Formed URL
    String fullURL = getApiUrl(target);

    Utils.log(TAG, "Get Request: " + fullURL);

    // Pre-emptively cache URI Parsing
    try{
        URI.create(fullURL);
    } catch(IllegalArgumentException e){
        e.printStackTrace();
        handler.onFailure(e, new JSONObject());
        return;
    }

    // Make get request
    if(params != null){
        _client.get(fullURL, params, handler);
    }else
        _client.get(fullURL, handler);
}
 
开发者ID:hackathon-3d,项目名称:sauce-bosses-repo,代码行数:28,代码来源:APIClient.java

示例2: onActivityCreated

import com.r0adkll.deadskunk.utils.Utils; //导入方法依赖的package包/类
@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

    // Load listview
    mList = (ListView) getActivity().findViewById(R.id.license_list);

    // Look for saved licences file
    if(savedInstanceState != null){
        int savedConfigId = savedInstanceState.getInt("config_file", -1);
        if(savedConfigId != -1){
            mConfigFile = savedConfigId;
        }
    }

    // Safety
    if(mConfigFile == 0){
        Utils.log(TAG, "No valid config file for the LicenceFragment");
        getFragmentManager().popBackStack();
        return;
    }

    // Parse Configuration
    mLibraries = parseConfigFile();

    // Create adapter
    mAdapter = new LibraryListAdapter(getActivity(), R.layout.layout_library_item, mLibraries);
    mList.setAdapter(mAdapter);

    // Set action listener if available
    if(mActionListener != null){
        mAdapter.setActionListener(mActionListener);
    }

}
 
开发者ID:hackathon-3d,项目名称:sauce-bosses-repo,代码行数:36,代码来源:LicenseFragment.java

示例3: postRequest

import com.r0adkll.deadskunk.utils.Utils; //导入方法依赖的package包/类
/**
 * Make a /POST request to the nimbus API server with nothing but
 * request parameters
 * @param target		the target endpoint
 * @param params		the request params
 * @param handler		the async response handler
 */
public static void postRequest(String target, RequestParams params, JsonHttpResponseHandler handler){
    // Get Fully Formed URL
    String fullURL = getApiUrl(target);

    // Make Post request
    if(params != null){
        // Post Request
        _client.post(fullURL, params, handler);
    }else
        _client.post(fullURL, handler);

    // Log
    Utils.log(TAG, "Posting Server Request!");
}
 
开发者ID:hackathon-3d,项目名称:sauce-bosses-repo,代码行数:22,代码来源:APIClient.java

示例4: savePrescriptions

import com.r0adkll.deadskunk.utils.Utils; //导入方法依赖的package包/类
/**
 * Save the user to disk
 * @param ctx   application context
 * @return      result of the operation (IO_FAIL, IO_SUCCESS)
 */
public synchronized int savePrescriptions(Context ctx){
    long pre = System.currentTimeMillis();
    int result = FileUtils.IO_FAIL;
    if(mPrescriptions != null){
        result = FileUtils.writeObjectToInternal(ctx, "PRESC_CACHE", mPrescriptions);
        long post = System.currentTimeMillis();
        Utils.log(TAG, "[" + result + "] User Data cached in " + (post - pre));
    }
    return result;
}
 
开发者ID:hackathon-3d,项目名称:sauce-bosses-repo,代码行数:16,代码来源:UserSession.java

示例5: loadPrescriptions

import com.r0adkll.deadskunk.utils.Utils; //导入方法依赖的package包/类
/**
 * Load the user data from the disk
 * @param ctx   application context
 * @return      result of the operation (IO_FAIL, IO_SUCCESS)
 */
public synchronized int loadPrescriptions(Context ctx){
    long pre = System.currentTimeMillis();
    int result = FileUtils.IO_FAIL;

    ArrayList<Prescription> cacheUser = (ArrayList<Prescription>) FileUtils.readObject(ctx, "PRESC_CACHE");
    if(cacheUser != null){
        mPrescriptions = new ArrayList<Prescription>(cacheUser);
        result = FileUtils.IO_SUCCESS;
        long post = System.currentTimeMillis();
        Utils.log(TAG, "[" + result + "] User Data loaded in "  + (post - pre));
    }
    return result;
}
 
开发者ID:hackathon-3d,项目名称:sauce-bosses-repo,代码行数:19,代码来源:UserSession.java

示例6: onSuccess

import com.r0adkll.deadskunk.utils.Utils; //导入方法依赖的package包/类
@Override
public void onSuccess(JSONObject response) {
    Utils.log("PARH", response.toString());

    super.onSuccess(response);


    String error = response.optString("error", "SUCCESS");
    if(error.equalsIgnoreCase("SUCCESS")){
        onRequestSuccess(response);
    }else{
        onRequestFailure(error);
    }

}
 
开发者ID:hackathon-3d,项目名称:sauce-bosses-repo,代码行数:16,代码来源:PillAlarmResponseHandler.java

示例7: onCompletion

import com.r0adkll.deadskunk.utils.Utils; //导入方法依赖的package包/类
@Override
public void onCompletion(MediaPlayer mp) {
	Utils.log(TAG, "Media Player has reached Completion");
}
 
开发者ID:hackathon-3d,项目名称:sauce-bosses-repo,代码行数:5,代码来源:AudioPlayer.java

示例8: onSeekComplete

import com.r0adkll.deadskunk.utils.Utils; //导入方法依赖的package包/类
@Override
public void onSeekComplete(MediaPlayer mp) {
	Utils.log(TAG, "Media Player Seek Complete [" + mp.getCurrentPosition() + ", " + mp.getDuration() + "]");
}
 
开发者ID:hackathon-3d,项目名称:sauce-bosses-repo,代码行数:5,代码来源:AudioPlayer.java

示例9: onInfo

import com.r0adkll.deadskunk.utils.Utils; //导入方法依赖的package包/类
@Override
public boolean onInfo(MediaPlayer mp, int what, int extra) {
	Utils.log(TAG, "Media Player Info[" + what + ", " + extra + "]");
	return false;
}
 
开发者ID:hackathon-3d,项目名称:sauce-bosses-repo,代码行数:6,代码来源:AudioPlayer.java

示例10: onError

import com.r0adkll.deadskunk.utils.Utils; //导入方法依赖的package包/类
@Override
public boolean onError(MediaPlayer mp, int what, int extra) {
	Utils.log(TAG, "Media Player Error[" + what + ", " + extra + "]");
	STATE = ERROR;
	return false;
}
 
开发者ID:hackathon-3d,项目名称:sauce-bosses-repo,代码行数:7,代码来源:AudioPlayer.java

示例11: onError

import com.r0adkll.deadskunk.utils.Utils; //导入方法依赖的package包/类
@Override
public void onError(MediaRecorder mr, int what, int extra) {
	Utils.log(TAG, "Recording Error[" + what + ", " + extra + "]");
}
 
开发者ID:hackathon-3d,项目名称:sauce-bosses-repo,代码行数:5,代码来源:AudioRecorder.java

示例12: onInfo

import com.r0adkll.deadskunk.utils.Utils; //导入方法依赖的package包/类
@Override
public void onInfo(MediaRecorder mr, int what, int extra) {
	Utils.log(TAG, "Recorder Info[" + what + ", " + extra + "]");
}
 
开发者ID:hackathon-3d,项目名称:sauce-bosses-repo,代码行数:5,代码来源:AudioRecorder.java

示例13: onFailure

import com.r0adkll.deadskunk.utils.Utils; //导入方法依赖的package包/类
@Override
public void onFailure(Throwable e, JSONObject errorResponse) {
    Utils.log("PARH", "FAILED API REQUEST");
    super.onFailure(e, errorResponse);
    onRequestFailure(e.getMessage());
}
 
开发者ID:hackathon-3d,项目名称:sauce-bosses-repo,代码行数:7,代码来源:PillAlarmResponseHandler.java


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