1/*------------------------------------------------------------------------- 2 * drawElements Quality Program Tester Core 3 * ---------------------------------------- 4 * 5 * Copyright 2014 The Android Open Source Project 6 * 7 * Licensed under the Apache License, Version 2.0 (the "License"); 8 * you may not use this file except in compliance with the License. 9 * You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, software 14 * distributed under the License is distributed on an "AS IS" BASIS, 15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 * See the License for the specific language governing permissions and 17 * limitations under the License. 18 * 19 *//*! 20 * \file 21 * \brief Log wrapper 22 *//*--------------------------------------------------------------------*/ 23 24package com.drawelements.deqp.testercore; 25 26import javax.microedition.khronos.egl.*; 27 28public class Log { 29 30 private static final boolean LOG_VERBOSE = android.util.Log.isLoggable("dEQP", android.util.Log.VERBOSE); 31 private static final boolean LOG_DEBUG = android.util.Log.isLoggable("dEQP", android.util.Log.DEBUG); 32 private static final boolean LOG_INFO = true; 33 private static final boolean LOG_WARNING = true; 34 private static final boolean LOG_ERROR = true; 35 36 public static void d (String tag, String msg) { 37 if (LOG_DEBUG) 38 android.util.Log.d(tag, msg); 39 } 40 41 public static void i (String tag, String msg) { 42 if (LOG_INFO) 43 android.util.Log.i(tag, msg); 44 } 45 46 public static void w (String tag, String msg) { 47 if (LOG_WARNING) 48 android.util.Log.w(tag, msg); 49 } 50 51 public static void w (String tag, String msg, Throwable tr) { 52 if (LOG_WARNING) 53 android.util.Log.w(tag, msg, tr); 54 } 55 56 public static void e (String tag, String msg) { 57 if (LOG_ERROR) 58 android.util.Log.e(tag, msg); 59 } 60 61 public static void e (String tag, String msg, Throwable tr) { 62 if (LOG_ERROR) 63 android.util.Log.e(tag, msg, tr); 64 } 65} 66