2 * audio-session-manager
4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Seungbae Shin <seungbae.shin@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
28 #ifdef __USE_LOGMANAGER__
31 #define LOG_TAG "MMFW_SESSIONMGR"
32 #define asm_info(fmt, arg...) SLOG(LOG_VERBOSE, LOG_TAG, "<DEBUG> [%s:%d] "fmt"", __FUNCTION__,__LINE__,##arg)
33 #define asm_warning(fmt, arg...) SLOG(LOG_WARN, LOG_TAG, "<WARNI> [%s:%d] "fmt"", __FUNCTION__,__LINE__,##arg)
34 #define asm_error(fmt, arg...) SLOG(LOG_ERROR, LOG_TAG, "<ERROR> [%s:%d] "fmt"", __FUNCTION__,__LINE__,##arg)
35 #define asm_critical(fmt, arg...) SLOG(LOG_ERROR, LOG_TAG, "<FATAL> [%s:%d] "fmt"", __FUNCTION__,__LINE__,##arg)
36 #define asm_fenter() SLOG(LOG_VERBOSE, LOG_TAG, "<ENTER> [%s:%d]", __FUNCTION__,__LINE__)
37 #define asm_fleave() SLOG(LOG_VERBOSE, LOG_TAG, "<LEAVE> [%s:%d]", __FUNCTION__,__LINE__)
39 #else //__USE_LOGMANAGER__
41 #define asm_info_r(msg, args...) fprintf(stderr, msg, ##args)
42 #define asm_warning_r(msg, args...) fprintf(stderr, msg, ##args)
43 #define asm_error_r(msg, args...) fprintf(stderr, msg, ##args)
44 #define asm_critical_r(msg, args...) fprintf(stderr, msg, ##args)
45 #define asm_assert_r(condition) (condition)
47 #define asm_info(msg, args...) fprintf(stderr, msg, ##args)
48 #define asm_warning(msg, args...) fprintf(stderr, msg, ##args)
49 #define asm_error(msg, args...) fprintf(stderr, msg, ##args)
50 #define asm_critical(msg, args...) fprintf(stderr, msg, ##args)
51 #define asm_assert(condition) (condition)
55 #endif //__USE_LOGMANAGER__
57 #else //__DEBUG_MODE__
59 #define asm_info_r(msg, args...)
60 #define asm_warning_r(msg, args...)
61 #define asm_error_r(msg, args...)
62 #define asm_critical_r(msg, args...)
63 #define asm_assert_r(condition) (condition)
65 #define asm_info(msg, args...)
66 #define asm_warning(msg, args...)
67 #define asm_error(msg, args...)
68 #define asm_critical(msg, args...)
69 #define asm_assert(condition) (condition)
73 #endif // __DEBUG_MODE__
75 #endif /* __ASM_LOG_H__ */