NetwerkTestLogging.h 717 B

1234567891011121314151617181920212223
  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
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. #ifndef NetwerkTestLogging_h
  6. #define NetwerkTestLogging_h
  7. #include "mozilla/Logging.h"
  8. // The netwerk standalone cpp unit tests will just use PR_LogPrint as they don't
  9. // have access to mozilla::detail::log_print. To support that MOZ_LOG is
  10. // redefined.
  11. #undef MOZ_LOG
  12. #define MOZ_LOG(_module,_level,_args) \
  13. PR_BEGIN_MACRO \
  14. if (MOZ_LOG_TEST(_module,_level)) { \
  15. PR_LogPrint _args; \
  16. } \
  17. PR_END_MACRO
  18. #endif