Bug 1254888 - Part 1: Add logging macro to dom/presentation. r=schien

This commit is contained in:
Mantaroh Yoshinaga 2016-03-11 00:16:00 -05:00
parent b53bc9fd1c
commit cf62a854b6
2 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,22 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#ifndef mozilla_dom_PresentationLog_h
#define mozilla_dom_PresentationLog_h
/*
* NSPR_LOG_MODULES=Presentation:5
* For detail, see PresentationService.cpp
*/
namespace mozilla {
namespace dom {
extern mozilla::LazyLogModule gPresentationLog;
}
}
#undef PRES_DEBUG
#define PRES_DEBUG(...) MOZ_LOG(mozilla::dom::gPresentationLog, mozilla::LogLevel::Debug, (__VA_ARGS__))
#endif // mozilla_dom_PresentationLog_h

View File

@ -18,6 +18,7 @@
#include "nsServiceManagerUtils.h"
#include "nsThreadUtils.h"
#include "nsXULAppAPI.h"
#include "PresentationLog.h"
#include "PresentationService.h"
using namespace mozilla;
@ -48,6 +49,8 @@ private:
nsString mOrigin;
};
LazyLogModule gPresentationLog("Presentation");
} // namespace dom
} // namespace mozilla