/exynos4/hal/libhwcomposer/SecHWCLog.cpp

https://bitbucket.org/cyanogenmod/android_hardware_samsung · C++ · 51 lines · 21 code · 7 blank · 23 comment · 1 complexity · a3b70e494e02945753152893c9f4413f MD5 · raw file

  1. /*
  2. * Copyright (C) 2010 The Android Open Source Project
  3. *
  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. *
  18. * @author Rama, Meka(v.meka@samsung.com)
  19. Sangwoo, Park(sw5771.park@samsung.com)
  20. Jamie Oh (jung-min.oh@samsung.com)
  21. * @date 2011-03-11
  22. *
  23. */
  24. #include <utils/Log.h>
  25. #include "SecHWCUtils.h"
  26. void _SEC_HWC_Log(HWC_LOG_LEVEL logLevel, const char *tag, const char *msg, ...)
  27. {
  28. va_list argptr;
  29. va_start(argptr, msg);
  30. switch (logLevel) {
  31. case HWC_LOG_DEBUG:
  32. __android_log_vprint(ANDROID_LOG_DEBUG, tag, msg, argptr);
  33. break;
  34. case HWC_LOG_WARNING:
  35. __android_log_vprint(ANDROID_LOG_WARN, tag, msg, argptr);
  36. break;
  37. case HWC_LOG_ERROR:
  38. __android_log_vprint(ANDROID_LOG_ERROR, tag, msg, argptr);
  39. break;
  40. default:
  41. __android_log_vprint(ANDROID_LOG_VERBOSE, tag, msg, argptr);
  42. }
  43. va_end(argptr);
  44. }