-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix C++ log level names in Log4cxxLogger #4735
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
massakam
added
type/bug
The PR fixed a bug or issue reported a bug
component/c++
labels
Jul 16, 2019
rerun integration tests |
sijie
approved these changes
Jul 17, 2019
run java8 tests |
massakam
force-pushed
the
log4cxx-log-level
branch
from
July 18, 2019 11:21
d0d544c
to
60919ed
Compare
rerun cpp tests |
rerun integration tests |
easyfan
pushed a commit
to easyfan/pulsar
that referenced
this pull request
Jul 26, 2019
### Motivation If trying to build master C++ code with the `USE_LOG4CXX` flag turned ON, compilation errors occur: ``` /tmp/pulsar/pulsar-client-cpp/lib/Log4cxxLogger.cc: In static member function ‘static log4cxx::LevelPtr pulsar::Log4CxxLogger::getLevel(pulsar::Logger::Level)’: /tmp/pulsar/pulsar-client-cpp/lib/Log4cxxLogger.cc:53:18: error: ‘DEBUG’ was not declared in this scope case DEBUG: ^ /tmp/pulsar/pulsar-client-cpp/lib/Log4cxxLogger.cc:55:18: error: ‘INFO’ was not declared in this scope case INFO: ^ /tmp/pulsar/pulsar-client-cpp/lib/Log4cxxLogger.cc:57:18: error: ‘WARN’ was not declared in this scope case WARN: ^ /tmp/pulsar/pulsar-client-cpp/lib/Log4cxxLogger.cc:59:18: error: ‘ERROR’ was not declared in this scope case ERROR: ^ /tmp/pulsar/pulsar-client-cpp/lib/Log4cxxLogger.cc:52:16: error: enumeration value ‘LEVEL_DEBUG’ not handled in switch [-Werror=switch] switch (level) { ^ /tmp/pulsar/pulsar-client-cpp/lib/Log4cxxLogger.cc:52:16: error: enumeration value ‘LEVEL_INFO’ not handled in switch [-Werror=switch] /tmp/pulsar/pulsar-client-cpp/lib/Log4cxxLogger.cc:52:16: error: enumeration value ‘LEVEL_WARN’ not handled in switch [-Werror=switch] /tmp/pulsar/pulsar-client-cpp/lib/Log4cxxLogger.cc:52:16: error: enumeration value ‘LEVEL_ERROR’ not handled in switch [-Werror=switch] cc1plus: some warnings being treated as errors make[2]: *** [lib/CMakeFiles/pulsarStatic.dir/Log4cxxLogger.cc.o] Error 1 make[2]: *** Waiting for unfinished jobs.... ``` This is because the enum values renamed in apache#4664 are still used in `Log4cxxLogger.cc`. ### Modifications Fixed the enum values used in `Log4cxxLogger.cc` by adding the prefix `LEVEL_`.
jiazhai
pushed a commit
that referenced
this pull request
Aug 28, 2019
### Motivation If trying to build master C++ code with the `USE_LOG4CXX` flag turned ON, compilation errors occur: ``` /tmp/pulsar/pulsar-client-cpp/lib/Log4cxxLogger.cc: In static member function ‘static log4cxx::LevelPtr pulsar::Log4CxxLogger::getLevel(pulsar::Logger::Level)’: /tmp/pulsar/pulsar-client-cpp/lib/Log4cxxLogger.cc:53:18: error: ‘DEBUG’ was not declared in this scope case DEBUG: ^ /tmp/pulsar/pulsar-client-cpp/lib/Log4cxxLogger.cc:55:18: error: ‘INFO’ was not declared in this scope case INFO: ^ /tmp/pulsar/pulsar-client-cpp/lib/Log4cxxLogger.cc:57:18: error: ‘WARN’ was not declared in this scope case WARN: ^ /tmp/pulsar/pulsar-client-cpp/lib/Log4cxxLogger.cc:59:18: error: ‘ERROR’ was not declared in this scope case ERROR: ^ /tmp/pulsar/pulsar-client-cpp/lib/Log4cxxLogger.cc:52:16: error: enumeration value ‘LEVEL_DEBUG’ not handled in switch [-Werror=switch] switch (level) { ^ /tmp/pulsar/pulsar-client-cpp/lib/Log4cxxLogger.cc:52:16: error: enumeration value ‘LEVEL_INFO’ not handled in switch [-Werror=switch] /tmp/pulsar/pulsar-client-cpp/lib/Log4cxxLogger.cc:52:16: error: enumeration value ‘LEVEL_WARN’ not handled in switch [-Werror=switch] /tmp/pulsar/pulsar-client-cpp/lib/Log4cxxLogger.cc:52:16: error: enumeration value ‘LEVEL_ERROR’ not handled in switch [-Werror=switch] cc1plus: some warnings being treated as errors make[2]: *** [lib/CMakeFiles/pulsarStatic.dir/Log4cxxLogger.cc.o] Error 1 make[2]: *** Waiting for unfinished jobs.... ``` This is because the enum values renamed in #4664 are still used in `Log4cxxLogger.cc`. ### Modifications Fixed the enum values used in `Log4cxxLogger.cc` by adding the prefix `LEVEL_`. (cherry picked from commit af8ea71)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
If trying to build master C++ code with the
USE_LOG4CXX
flag turned ON, compilation errors occur:This is because the enum values renamed in #4664 are still used in
Log4cxxLogger.cc
.Modifications
Fixed the enum values used in
Log4cxxLogger.cc
by adding the prefixLEVEL_
.Verifying this change