1*bebae9c0SAndroid Build Coastguard Worker /* 2*bebae9c0SAndroid Build Coastguard Worker * Copyright (C) 2010 The Android Open Source Project 3*bebae9c0SAndroid Build Coastguard Worker * 4*bebae9c0SAndroid Build Coastguard Worker * Licensed under the Apache License, Version 2.0 (the "License"); 5*bebae9c0SAndroid Build Coastguard Worker * you may not use this file except in compliance with the License. 6*bebae9c0SAndroid Build Coastguard Worker * You may obtain a copy of the License at 7*bebae9c0SAndroid Build Coastguard Worker * 8*bebae9c0SAndroid Build Coastguard Worker * http://www.apache.org/licenses/LICENSE-2.0 9*bebae9c0SAndroid Build Coastguard Worker * 10*bebae9c0SAndroid Build Coastguard Worker * Unless required by applicable law or agreed to in writing, software 11*bebae9c0SAndroid Build Coastguard Worker * distributed under the License is distributed on an "AS IS" BASIS, 12*bebae9c0SAndroid Build Coastguard Worker * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13*bebae9c0SAndroid Build Coastguard Worker * See the License for the specific language governing permissions and 14*bebae9c0SAndroid Build Coastguard Worker * limitations under the License. 15*bebae9c0SAndroid Build Coastguard Worker */ 16*bebae9c0SAndroid Build Coastguard Worker 17*bebae9c0SAndroid Build Coastguard Worker #include "sles_allinclusive.h" 18*bebae9c0SAndroid Build Coastguard Worker 19*bebae9c0SAndroid Build Coastguard Worker #ifdef ANDROID 20*bebae9c0SAndroid Build Coastguard Worker /** \brief Log messages are prefixed by this tag */ 21*bebae9c0SAndroid Build Coastguard Worker const char slLogTag[] = "libOpenSLES"; 22*bebae9c0SAndroid Build Coastguard Worker #endif 23*bebae9c0SAndroid Build Coastguard Worker 24*bebae9c0SAndroid Build Coastguard Worker #if 0 25*bebae9c0SAndroid Build Coastguard Worker // There is no support for configuring the logging level at runtime. 26*bebae9c0SAndroid Build Coastguard Worker // If that was needed, it could be done like this: 27*bebae9c0SAndroid Build Coastguard Worker // #define SL_LOGx(...) do { if (slLogLevel <= ...) ... } while (0) 28*bebae9c0SAndroid Build Coastguard Worker 29*bebae9c0SAndroid Build Coastguard Worker /** \brief Default runtime log level */ 30*bebae9c0SAndroid Build Coastguard Worker 31*bebae9c0SAndroid Build Coastguard Worker SLAndroidLogLevel slLogLevel = USE_LOG_RUNTIME; 32*bebae9c0SAndroid Build Coastguard Worker 33*bebae9c0SAndroid Build Coastguard Worker /** \brief Set the runtime log level */ 34*bebae9c0SAndroid Build Coastguard Worker 35*bebae9c0SAndroid Build Coastguard Worker SL_API void SLAPIENTRY slAndroidSetLogLevel(SLAndroidLogLevel logLevel) 36*bebae9c0SAndroid Build Coastguard Worker { 37*bebae9c0SAndroid Build Coastguard Worker // Errors can't be disabled 38*bebae9c0SAndroid Build Coastguard Worker if (logLevel > SLAndroidLogLevel_Error) 39*bebae9c0SAndroid Build Coastguard Worker logLevel = SLAndroidLogLevel_Error; 40*bebae9c0SAndroid Build Coastguard Worker slLogLevel = logLevel; 41*bebae9c0SAndroid Build Coastguard Worker } 42*bebae9c0SAndroid Build Coastguard Worker #endif 43