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
26public class Log {
27
28	private static final boolean	LOG_DEBUG		= android.util.Log.isLoggable("dEQP", android.util.Log.DEBUG);
29	private static final boolean	LOG_INFO		= true;
30	private static final boolean	LOG_WARNING		= true;
31	private static final boolean	LOG_ERROR		= true;
32
33	public static void d (String tag, String msg) {
34		if (LOG_DEBUG)
35			android.util.Log.d(tag, msg);
36	}
37
38	public static void i (String tag, String msg) {
39		if (LOG_INFO)
40			android.util.Log.i(tag, msg);
41	}
42
43	public static void w (String tag, String msg) {
44		if (LOG_WARNING)
45			android.util.Log.w(tag, msg);
46	}
47
48	public static void w (String tag, String msg, Throwable tr) {
49		if (LOG_WARNING)
50			android.util.Log.w(tag, msg, tr);
51	}
52
53	public static void e (String tag, String msg) {
54		if (LOG_ERROR)
55			android.util.Log.e(tag, msg);
56	}
57
58	public static void e (String tag, String msg, Throwable tr) {
59		if (LOG_ERROR)
60			android.util.Log.e(tag, msg, tr);
61	}
62}
63