HalLog.h 928 B

123456789101112131415161718192021222324252627282930313233
  1. /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4. * You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. #ifndef mozilla_HalLog_h
  6. #define mozilla_HalLog_h
  7. #include "mozilla/Logging.h"
  8. /*
  9. * HalLog.h contains internal macros and functions used for logging.
  10. *
  11. * This should be considered a private include and not used in non-HAL code.
  12. * To enable logging in non-debug builds define the PR_FORCE_LOG macro here.
  13. */
  14. namespace mozilla {
  15. namespace hal {
  16. mozilla::LogModule *GetHalLog();
  17. #define HAL_LOG(...) \
  18. MOZ_LOG(mozilla::hal::GetHalLog(), LogLevel::Debug, (__VA_ARGS__))
  19. #define HAL_ERR(...) \
  20. MOZ_LOG(mozilla::hal::GetHalLog(), LogLevel::Error, (__VA_ARGS__))
  21. } // namespace hal
  22. } // namespace mozilla
  23. #endif // mozilla_HalLog_h