Home | History | Annotate | Download | only in service
      1 /*
      2  * Copyright (C) 2015 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 package com.android.mms.service;
     18 
     19 import android.util.Log;
     20 
     21 /**
     22  * Logging utility
     23  */
     24 public class LogUtil {
     25     private static final String TAG = "MmsService";
     26 
     27     public static void i(final String requestId, final String message) {
     28         Log.i(TAG, "[" + requestId + "] " + message);
     29     }
     30 
     31     public static void i(final String message) {
     32         Log.i(TAG, message);
     33     }
     34 
     35     public static void d(final String requestId, final String message) {
     36         Log.d(TAG, "[" + requestId + "] " + message);
     37     }
     38 
     39     public static void d(final String message) {
     40         Log.d(TAG, message);
     41     }
     42 
     43     public static void v(final String requestId, final String message) {
     44         Log.v(TAG, "[" + requestId + "] " + message);
     45     }
     46 
     47     public static void v(final String message) {
     48         Log.v(TAG, message);
     49     }
     50 
     51     public static void e(final String requestId, final String message, final Throwable t) {
     52         Log.e(TAG, "[" + requestId + "] " + message, t);
     53     }
     54 
     55     public static void e(final String message, final Throwable t) {
     56         Log.e(TAG, message, t);
     57     }
     58 
     59     public static void e(final String requestId, final String message) {
     60         Log.e(TAG, "[" + requestId + "] " + message);
     61     }
     62 
     63     public static void e(final String message) {
     64         Log.e(TAG, message);
     65     }
     66 
     67     public static void w(final String requestId, final String message, final Throwable t) {
     68         Log.w(TAG, "[" + requestId + "] " + message, t);
     69     }
     70 
     71     public static void w(final String message, final Throwable t) {
     72         Log.w(TAG, message, t);
     73     }
     74 
     75     public static void w(final String requestId, final String message) {
     76         Log.w(TAG, "[" + requestId + "] " + message);
     77     }
     78 
     79     public static void w(final String message) {
     80         Log.w(TAG, message);
     81     }
     82 
     83     public static boolean isLoggable(final int logLevel) {
     84         return Log.isLoggable(TAG, logLevel);
     85     }
     86 }
     87