Bug 1165515 - Part 11: Align CSFLogLevel with PR_LOG levels. r=jesup

This aligns CSFLogLevel with the corresponding PR_LOG levels by removing the
unused CRITICAL and NOTICE CSF log levels and renaming OBNOXIOUS to VERBOSE.

mozilla/Logging.h was moved into the implementation file so as to avoid
compilation errors in C-only code.
This commit is contained in:
Eric Rahm 2015-06-03 15:22:37 -07:00
Родитель b28e274194
Коммит 61e7ce5adb
3 изменённых файлов: 12 добавлений и 11 удалений

Просмотреть файл

@ -8,6 +8,8 @@
#include "CSFLog.h"
#include "prenv.h"
#include "mozilla/Logging.h"
static PRLogModuleInfo*
GetUserMediaLog()
{

Просмотреть файл

@ -14,6 +14,8 @@
#include "prthread.h"
#include "nsThreadUtils.h"
#include "mozilla/Logging.h"
static PRLogModuleInfo *gLogModuleInfo = nullptr;
PRLogModuleInfo *GetSignalingLogInfo()

Просмотреть файл

@ -6,30 +6,27 @@
#define CSFLOG_H
#include <stdarg.h>
#include "mozilla/Logging.h"
struct PRLogModuleInfo;
typedef enum{
CSF_LOG_CRITICAL =1,
CSF_LOG_ERROR,
CSF_LOG_ERROR = 1,
CSF_LOG_WARNING,
CSF_LOG_NOTICE,
CSF_LOG_INFO,
CSF_LOG_DEBUG,
CSF_LOG_OBNOXIOUS
CSF_LOG_VERBOSE,
} CSFLogLevel;
#define CSFLogError(tag , format, ...) CSFLog( CSF_LOG_ERROR, __FILE__ , __LINE__ , tag , format , ## __VA_ARGS__ )
#define CSFLogErrorV(tag , format, va_list_arg) CSFLogV(CSF_LOG_ERROR, __FILE__ , __LINE__ , tag , format , va_list_arg )
#define CSFLogWarn(tag , format, ...) CSFLog( CSF_LOG_WARNING, __FILE__ , __LINE__ , tag , format , ## __VA_ARGS__ )
#define CSFLogWarnV(tag , format, va_list_arg) CSFLogV(CSF_LOG_WARNING, __FILE__ , __LINE__ , tag , format , va_list_arg )
#define CSFLogNotice(tag , format, ...) CSFLog( CSF_LOG_NOTICE, __FILE__ , __LINE__ , tag , format , ## __VA_ARGS__ )
#define CSFLogNoticeV(tag , format, va_list_arg) CSFLogV(CSF_LOG_NOTICE, __FILE__ , __LINE__ , tag , format , va_list_arg )
#define CSFLogInfo(tag , format, ...) CSFLog( CSF_LOG_INFO, __FILE__ , __LINE__ , tag , format , ## __VA_ARGS__ )
#define CSFLogInfoV(tag , format, va_list_arg) CSFLogV(CSF_LOG_INFO, __FILE__ , __LINE__ , tag , format , va_list_arg )
#define CSFLogDebug(tag , format, ...) CSFLog(CSF_LOG_DEBUG, __FILE__ , __LINE__ , tag , format , ## __VA_ARGS__ )
#define CSFLogDebugV(tag , format, va_list_arg) CSFLogV(CSF_LOG_DEBUG, __FILE__ , __LINE__ , tag , format , va_list_arg )
#define CSFLogObnoxious(tag , format, ...) CSFLog(CSF_LOG_OBNOXIOUS, __FILE__ , __LINE__ , tag , format , ## __VA_ARGS__ )
#define CSFLogObnoxiousV(tag , format, va_list_arg) CSFLogV(CSF_LOG_OBNOXIOUS, __FILE__ , __LINE__ , tag , format , va_list_arg )
#define CSFLogVerbose(tag , format, ...) CSFLog(CSF_LOG_VERBOSE, __FILE__ , __LINE__ , tag , format , ## __VA_ARGS__ )
#define CSFLogVerboseV(tag , format, va_list_arg) CSFLogV(CSF_LOG_VERBOSE, __FILE__ , __LINE__ , tag , format , va_list_arg )
#ifdef __cplusplus
extern "C"
@ -43,8 +40,8 @@ void CSFLog( CSFLogLevel priority, const char* sourceFile, int sourceLine, const
void CSFLogV( CSFLogLevel priority, const char* sourceFile, int sourceLine, const char* tag , const char* format, va_list args);
PRLogModuleInfo *GetSignalingLogInfo();
PRLogModuleInfo *GetWebRTCLogInfo();
struct PRLogModuleInfo *GetSignalingLogInfo();
struct PRLogModuleInfo *GetWebRTCLogInfo();
#ifdef __cplusplus
}