Bug 867273 - Force PR_LOG in production builds. r=ekr

This commit is contained in:
Suhas Nandakumar 2013-05-20 19:11:01 -07:00
parent d8cb0383c6
commit f064e8a50e
17 changed files with 23 additions and 27 deletions

View File

@ -4,6 +4,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "logging.h"
#include "nspr.h"
#include "cryptohi.h"
#include "ssl.h"
@ -12,7 +13,6 @@
#include "sechash.h"
#include "nsError.h"
#include "dtlsidentity.h"
#include "logging.h"
namespace mozilla {

View File

@ -9,8 +9,16 @@
#ifndef logging_h__
#define logging_h__
#include <sstream>
#if defined(PR_LOG)
#error "Must #include logging.h before before any IPDL-generated files or other files that #include prlog.h."
#endif
// Enforce logging under production builds for MOZ_MTLOG friends.
#ifndef PR_LOGGING
#define FORCE_PR_LOG 1
#endif
#include <sstream>
#include <prlog.h>
#if defined(PR_LOGGING)
@ -31,7 +39,6 @@
PR_LOG(getLogModule(), level, ("%s", str.str().c_str())); } while(0)
#else
// PR_LOGGING is off --> make no-op MTLOG macros
#define MOZ_MTLOG_MODULE(n)
#define MOZ_MTLOG(level, b)

View File

@ -44,10 +44,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <string>
#include <vector>
#include "logging.h"
#include "nspr.h"
#include "nss.h"
#include "pk11pub.h"
#include "prlog.h"
#include "nsCOMPtr.h"
#include "nsComponentManagerUtils.h"
@ -79,7 +79,6 @@ extern "C" {
}
// Local includes
#include "logging.h"
#include "nricectx.h"
#include "nricemediastream.h"
#include "nr_socket_prsock.h"

View File

@ -44,6 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <string>
#include <vector>
#include "logging.h"
#include "nsError.h"
// nICEr includes
@ -64,7 +65,6 @@ extern "C" {
}
// Local includes
#include "logging.h"
#include "nricectx.h"
#include "nricemediastream.h"

View File

@ -41,6 +41,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "logging.h"
#include "nspr.h"
#include "prnetdb.h"
@ -65,9 +66,6 @@ extern "C" {
#include "nr_socket_prsock.h"
#include "mtransport/runnable_utils.h"
// Local includes
#include "logging.h"
namespace mozilla {
MOZ_MTLOG_MODULE("mtransport")

View File

@ -13,6 +13,7 @@
#include "sigslot.h"
#include "logging.h"
#include "nspr.h"
#include "nss.h"
#include "ssl.h"
@ -21,7 +22,6 @@
#include "nsThreadUtils.h"
#include "nsXPCOM.h"
#include "logging.h"
#include "nricectx.h"
#include "nricemediastream.h"
#include "nriceresolverfake.h"

View File

@ -12,6 +12,7 @@
#include "sigslot.h"
#include "logging.h"
#include "nsNetCID.h"
#include "nsITimer.h"
#include "nsComponentManagerUtils.h"
@ -22,7 +23,6 @@
#include "transportlayer.h"
#include "transportlayerloopback.h"
#include "logging.h"
#include "mtransport_test_utils.h"
#include "runnable_utils.h"
#include "usrsctp.h"

View File

@ -12,6 +12,7 @@
#include "sigslot.h"
#include "logging.h"
#include "nspr.h"
#include "nss.h"
#include "ssl.h"
@ -29,7 +30,6 @@
#include "transportlayerlog.h"
#include "transportlayerloopback.h"
#include "logging.h"
#include "mtransport_test_utils.h"
#include "runnable_utils.h"

View File

@ -44,6 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "sigslot.h"
#include "logging.h"
#include "nspr.h"
#include "nss.h"
#include "ssl.h"
@ -52,7 +53,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "nsThreadUtils.h"
#include "nsXPCOM.h"
#include "logging.h"
#include "mtransport_test_utils.h"
#include "runnable_utils.h"

View File

@ -7,8 +7,6 @@
// Original author: ekr@rtfm.com
#include <deque>
#include <prlog.h>
#include "logging.h"
#include "runnable_utils.h"
#include "transportflow.h"

View File

@ -5,8 +5,6 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. */
// Original author: ekr@rtfm.com
#include <prlog.h>
#include "logging.h"
#include "transportflow.h"
#include "transportlayer.h"

View File

@ -9,6 +9,7 @@
#include <queue>
#include <algorithm>
#include "logging.h"
#include "ssl.h"
#include "sslerr.h"
#include "sslproto.h"
@ -22,7 +23,6 @@
#include "nsServiceManagerUtils.h"
#include "dtlsidentity.h"
#include "logging.h"
#include "transportflow.h"
#include "transportlayerdtls.h"

View File

@ -6,6 +6,7 @@
// Original author: ekr@rtfm.com
#include "logging.h"
#include "nspr.h"
#include "prlock.h"
@ -19,7 +20,6 @@
#include "nsISocketTransportService.h"
#include "nsServiceManagerUtils.h"
#include "logging.h"
#include "transportflow.h"
#include "transportlayerloopback.h"

View File

@ -6,6 +6,7 @@
// Original author: ekr@rtfm.com
#include "logging.h"
#include "nspr.h"
#include "prerror.h"
#include "prio.h"
@ -17,7 +18,6 @@
#include "nsServiceManagerUtils.h"
#include "nsXPCOM.h"
#include "logging.h"
#include "transportflow.h"
#include "transportlayerprsock.h"

View File

@ -4,6 +4,7 @@
// Original author: ekr@rtfm.com
#include "logging.h"
#include "MediaPipeline.h"
#ifndef USE_FAKE_MEDIA_STREAMS
@ -13,7 +14,6 @@
#include <math.h>
#include "nspr.h"
#include <prlog.h>
#include "srtp.h"
#ifdef MOZILLA_INTERNAL_API
@ -27,7 +27,6 @@
#endif
#endif
#include "logging.h"
#include "nsError.h"
#include "AudioSegment.h"
#include "MediaSegment.h"
@ -36,7 +35,6 @@
#include "transportlayer.h"
#include "transportlayerdtls.h"
#include "transportlayerice.h"
#include "runnable_utils.h"
using namespace mozilla;
@ -48,7 +46,6 @@ using namespace mozilla;
#define MP_LOG_INFO PR_LOG_DEBUG
#endif
// Logging context
MOZ_MTLOG_MODULE("mediapipeline")

View File

@ -4,14 +4,13 @@
// Original author: ekr@rtfm.com
#include "logging.h"
#include "SrtpFlow.h"
#include "srtp.h"
#include "ssl.h"
#include "sslproto.h"
#include "logging.h"
#include "mozilla/RefPtr.h"
// Logging context

View File

@ -8,6 +8,7 @@
#include "sigslot.h"
#include "logging.h"
#include "nsThreadUtils.h"
#include "nsXPCOM.h"
#include "nss.h"
@ -15,7 +16,6 @@
#include "sslproto.h"
#include "dtlsidentity.h"
#include "logging.h"
#include "mozilla/RefPtr.h"
#include "FakeMediaStreams.h"
#include "FakeMediaStreamsImpl.h"