DDLogUtils.h (1367B)
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* vim:set ts=2 sw=2 sts=2 et cindent: */ 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 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 7 #ifndef DDLogUtils_h_ 8 #define DDLogUtils_h_ 9 10 #include "mozilla/Logging.h" 11 12 // Logging for the DecoderDoctorLoggger code. 13 extern mozilla::LazyLogModule sDecoderDoctorLoggerLog; 14 #define DDL_LOG(level, arg, ...) \ 15 MOZ_LOG(sDecoderDoctorLoggerLog, level, (arg, ##__VA_ARGS__)) 16 #define DDL_DEBUG(arg, ...) \ 17 DDL_LOG(mozilla::LogLevel::Debug, arg, ##__VA_ARGS__) 18 #define DDL_INFO(arg, ...) DDL_LOG(mozilla::LogLevel::Info, arg, ##__VA_ARGS__) 19 #define DDL_WARN(arg, ...) \ 20 DDL_LOG(mozilla::LogLevel::Warning, arg, ##__VA_ARGS__) 21 22 // Output at shutdown the log given to DecoderDoctorLogger. 23 extern mozilla::LazyLogModule sDecoderDoctorLoggerEndLog; 24 #define DDLE_LOG(level, arg, ...) \ 25 MOZ_LOG(sDecoderDoctorLoggerEndLog, level, (arg, ##__VA_ARGS__)) 26 #define DDLE_DEBUG(arg, ...) \ 27 DDLE_LOG(mozilla::LogLevel::Debug, arg, ##__VA_ARGS__) 28 #define DDLE_INFO(arg, ...) \ 29 DDLE_LOG(mozilla::LogLevel::Info, arg, ##__VA_ARGS__) 30 #define DDLE_WARN(arg, ...) \ 31 DDLE_LOG(mozilla::LogLevel::Warning, arg, ##__VA_ARGS__) 32 33 #endif // DDLogUtils_h_