michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef nsWyciwyg_h__ michael@0: #define nsWyciwyg_h__ michael@0: michael@0: #if defined(MOZ_LOGGING) michael@0: #define FORCE_PR_LOG michael@0: #endif michael@0: michael@0: // e10s mess: IPDL-generatd headers include chromium which both #includes michael@0: // prlog.h, and #defines LOG in conflict with this file. michael@0: // Solution: (as described in bug 545995) michael@0: // 1) ensure that this file is #included before any IPDL-generated files and michael@0: // anything else that #includes prlog.h, so that we can make sure prlog.h michael@0: // sees FORCE_PR_LOG if needed. michael@0: // 2) #include IPDL boilerplate, and then undef LOG so our LOG wins. michael@0: // 3) nsNetModule.cpp does its own crazy stuff with #including prlog.h michael@0: // multiple times; allow it to define ALLOW_LATE_NSHTTP_H_INCLUDE to bypass michael@0: // check. michael@0: #if defined(PR_LOG) && !defined(ALLOW_LATE_NSHTTP_H_INCLUDE) michael@0: #error "If nsWyciwyg.h #included it must come before any IPDL-generated files or other files that #include prlog.h" michael@0: #endif michael@0: #include "mozilla/net/NeckoChild.h" michael@0: #undef LOG michael@0: michael@0: #include "prlog.h" michael@0: michael@0: #if defined(PR_LOGGING) michael@0: // michael@0: // Log module for HTTP Protocol logging... michael@0: // michael@0: // To enable logging (see prlog.h for full details): michael@0: // michael@0: // set NSPR_LOG_MODULES=nsWyciwyg:5 michael@0: // set NSPR_LOG_FILE=wyciwyg.log michael@0: // michael@0: // this enables PR_LOG_ALWAYS level information and places all output in michael@0: // the file wyciwyg.log michael@0: // michael@0: extern PRLogModuleInfo *gWyciwygLog; michael@0: #endif michael@0: michael@0: // http logging michael@0: #define LOG1(args) PR_LOG(gWyciwygLog, 1, args) michael@0: #define LOG2(args) PR_LOG(gWyciwygLog, 2, args) michael@0: #define LOG3(args) PR_LOG(gWyciwygLog, 3, args) michael@0: #define LOG4(args) PR_LOG(gWyciwygLog, 4, args) michael@0: #define LOG(args) LOG4(args) michael@0: michael@0: #define LOG1_ENABLED() PR_LOG_TEST(gWyciwygLog, 1) michael@0: #define LOG2_ENABLED() PR_LOG_TEST(gWyciwygLog, 2) michael@0: #define LOG3_ENABLED() PR_LOG_TEST(gWyciwygLog, 3) michael@0: #define LOG4_ENABLED() PR_LOG_TEST(gWyciwygLog, 4) michael@0: #define LOG_ENABLED() LOG4_ENABLED() michael@0: michael@0: #define WYCIWYG_TYPE "text/html" michael@0: michael@0: #endif // nsWyciwyg_h__