diff options
author | Shobhit Adlakha <ShobhitAd@users.noreply.github.com> | 2021-04-30 13:52:07 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-30 13:52:07 -0400 |
commit | 4dc2bd9a278628c8b952fc1f480eaa550f9cdcae (patch) | |
tree | cc12319aee6078badc97a4e6122813d28b34a1d3 /tools/policy_table_validator | |
parent | 74ea4bb79b6adf00702e68cf5d502bc3def0f285 (diff) | |
download | sdl_core-4dc2bd9a278628c8b952fc1f480eaa550f9cdcae.tar.gz |
Feature/Boost Logger Implementation (#3571)
* Implement 3rd-party Boost logger
* Add boost log config file
* Implement log filtering and formatting for the different sinks
* Fix Timestamp calculation
* Fix function trace string
* Implement setting to disable particular sinks
* Add append option to file sinks
* Telnet logger configuration
* Add cmake flag to switch beetween loggers
* Remove log4cxx appender include
* Style fix
* Modify BoostLogConfig file for tests to match the log4cxx properties file
* Exclude log4cxx related libraries
* Address review comments
* Add changes to only install boost log if the correct LOGGER_NAME is set
* Fix implementation for removing disabled sinks
* Add note for isEnabledFor function
* Address review comment
* Fix smartobject linking error
* Address review comments
Diffstat (limited to 'tools/policy_table_validator')
-rw-r--r-- | tools/policy_table_validator/main.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/tools/policy_table_validator/main.cpp b/tools/policy_table_validator/main.cpp index 7e099c7ae1..cc1318d215 100644 --- a/tools/policy_table_validator/main.cpp +++ b/tools/policy_table_validator/main.cpp @@ -6,8 +6,13 @@ #include "utils/file_system.h" #ifdef ENABLE_LOG -#include "utils/logger/logger_impl.h" +#ifdef LOG4CXX_LOGGER #include "utils/logger/log4cxxlogger.h" +#else // LOG4CXX_LOGGER +#include "utils/logger/boostlogger.h" +#endif // LOG4CXX_LOGGER + +#include "utils/logger/logger_impl.h" #endif // ENABLE_LOG #include "utils/logger.h" @@ -55,7 +60,13 @@ int main(int argc, char** argv) { // -------------------------------------------------------------------------- // Logger initialization // Redefine for each paticular logger implementation - auto logger = std::unique_ptr<logger::Log4CXXLogger>(new logger::Log4CXXLogger("log4cxx.properties")); +#ifdef LOG4CXX_LOGGER + auto logger = std::unique_ptr<logger::Log4CXXLogger>( + new logger::Log4CXXLogger("log4cxx.properties")); +#else // LOG4CXX_LOGGER + auto logger = std::unique_ptr<logger::BoostLogger>( + new logger::BoostLogger("boostlogconfig.ini")); +#endif // LOG4CXX_LOGGER auto logger_impl = std::unique_ptr<logger::LoggerImpl>(new logger::LoggerImpl()); logger::Logger::instance(logger_impl.get()); logger_impl->Init(std::move(logger)); |