blob: 6ad42837f4c79b3ba8d2472f8c2cc2637d8216e2 [file] [log] [blame]
codeworkxf1be2fe2012-03-24 17:38:29 +01001/*
codeworkx62f02ba2012-05-20 12:00:36 +02002 * Copyright (C) 2010 The Android Open Source Project
codeworkxf1be2fe2012-03-24 17:38:29 +01003 *
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/*
codeworkx62f02ba2012-05-20 12:00:36 +020018 *
19 * @author Rama, Meka(v.meka@samsung.com)
20 Sangwoo, Park(sw5771.park@samsung.com)
21 Jamie Oh (jung-min.oh@samsung.com)
22 * @date 2011-03-11
23 *
codeworkxf1be2fe2012-03-24 17:38:29 +010024 */
25
26#include <utils/Log.h>
27
codeworkx62f02ba2012-05-20 12:00:36 +020028#include "SecHWCUtils.h"
codeworkxf1be2fe2012-03-24 17:38:29 +010029
codeworkx62f02ba2012-05-20 12:00:36 +020030void _SEC_HWC_Log(HWC_LOG_LEVEL logLevel, const char *tag, const char *msg, ...)
codeworkxf1be2fe2012-03-24 17:38:29 +010031{
32 va_list argptr;
33
34 va_start(argptr, msg);
35
36 switch (logLevel) {
codeworkx62f02ba2012-05-20 12:00:36 +020037 case HWC_LOG_DEBUG:
codeworkxf1be2fe2012-03-24 17:38:29 +010038 __android_log_vprint(ANDROID_LOG_DEBUG, tag, msg, argptr);
39 break;
codeworkx62f02ba2012-05-20 12:00:36 +020040 case HWC_LOG_WARNING:
codeworkxf1be2fe2012-03-24 17:38:29 +010041 __android_log_vprint(ANDROID_LOG_WARN, tag, msg, argptr);
42 break;
codeworkx62f02ba2012-05-20 12:00:36 +020043 case HWC_LOG_ERROR:
codeworkxf1be2fe2012-03-24 17:38:29 +010044 __android_log_vprint(ANDROID_LOG_ERROR, tag, msg, argptr);
45 break;
46 default:
47 __android_log_vprint(ANDROID_LOG_VERBOSE, tag, msg, argptr);
48 }
49
50 va_end(argptr);
51}