Source code

Revision control

Other Tools

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