From 9a40a107f82e8c5c611e62266fd01478931a5eb4 Mon Sep 17 00:00:00 2001 From: "John W. Bruce" Date: Tue, 5 Mar 2019 11:35:39 -0800 Subject: [PATCH] Add LOG_SILENT LogPriority (This is a merge of http://go/wvgerrit/73743) The CE CDM implements the ability to silence all logging with a "silent" log level. However, under the covers, this assigned a value to g_cutoff that was not a member of LogPriority, which fails some extremely strict checks. This patch just adds a matching entry to LogPriority so that "silent" is now a valid level in that enum. Bug: 118622359 Test: CE CDM Build Test: Android Build Change-Id: Idafb26b7c5f9a24a32c84da9b3c5595434ef07fe --- libwvdrmengine/cdm/util/include/log.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/libwvdrmengine/cdm/util/include/log.h b/libwvdrmengine/cdm/util/include/log.h index ce390a0a..d79ff001 100644 --- a/libwvdrmengine/cdm/util/include/log.h +++ b/libwvdrmengine/cdm/util/include/log.h @@ -14,11 +14,15 @@ namespace wvcdm { // Simple logging class. The implementation is platform dependent. typedef enum { - LOG_ERROR, - LOG_WARN, - LOG_INFO, - LOG_DEBUG, - LOG_VERBOSE + // This log level should only be used for |g_cutoff|, in order to silence all + // logging. It should never be passed to |Log()| as a log level. + LOG_SILENT = -1, + + LOG_ERROR = 0, + LOG_WARN = 1, + LOG_INFO = 2, + LOG_DEBUG = 3, + LOG_VERBOSE = 4, } LogPriority; extern LogPriority g_cutoff;