Blame android/hal-log.h

Packit 34410b
/*
Packit 34410b
 * Copyright (C) 2013 Intel Corporation
Packit 34410b
 *
Packit 34410b
 * Licensed under the Apache License, Version 2.0 (the "License");
Packit 34410b
 * you may not use this file except in compliance with the License.
Packit 34410b
 * You may obtain a copy of the License at
Packit 34410b
 *
Packit 34410b
 *      http://www.apache.org/licenses/LICENSE-2.0
Packit 34410b
 *
Packit 34410b
 * Unless required by applicable law or agreed to in writing, software
Packit 34410b
 * distributed under the License is distributed on an "AS IS" BASIS,
Packit 34410b
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Packit 34410b
 * See the License for the specific language governing permissions and
Packit 34410b
 * limitations under the License.
Packit 34410b
 *
Packit 34410b
 */
Packit 34410b
Packit 34410b
#define LOG_TAG "BlueZ"
Packit 34410b
Packit 34410b
#ifdef __BIONIC__
Packit 34410b
#include <cutils/log.h>
Packit 34410b
#else
Packit 34410b
#include <stdio.h>
Packit 34410b
#define LOG_INFO " I"
Packit 34410b
#define LOG_WARN " W"
Packit 34410b
#define LOG_ERROR " E"
Packit 34410b
#define LOG_DEBUG " D"
Packit 34410b
#define ALOG(pri, tag, fmt, arg...) fprintf(stderr, tag pri": " fmt"\n", ##arg)
Packit 34410b
#endif
Packit 34410b
Packit 34410b
#define info(fmt, arg...) ALOG(LOG_INFO, LOG_TAG, fmt, ##arg)
Packit 34410b
#define warn(fmt, arg...) ALOG(LOG_WARN, LOG_TAG, fmt, ##arg)
Packit 34410b
#define error(fmt, arg...) ALOG(LOG_ERROR, LOG_TAG, fmt, ##arg)
Packit 34410b
#define DBG(fmt, arg...) ALOG(LOG_DEBUG, LOG_TAG, "%s:%s() "fmt, __FILE__, \
Packit 34410b
							__func__, ##arg)