diff options
author | ShobhitAd <adlakhashobhit@gmail.com> | 2021-04-29 16:39:36 -0400 |
---|---|---|
committer | ShobhitAd <adlakhashobhit@gmail.com> | 2021-04-29 16:39:36 -0400 |
commit | 770ef067050eb4100ea18d03489fe017025f71f8 (patch) | |
tree | cc12319aee6078badc97a4e6122813d28b34a1d3 | |
parent | bdb6bac9f111752f806ca87d11a3d008a8f37424 (diff) | |
download | sdl_core-feature/boost_logger_implementation.tar.gz |
Address review commentsfeature/boost_logger_implementation
-rw-r--r-- | src/appMain/main.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/appMain/main.cc b/src/appMain/main.cc index 0273b2c655..cedaf50497 100644 --- a/src/appMain/main.cc +++ b/src/appMain/main.cc @@ -152,6 +152,10 @@ int32_t main(int32_t argc, char** argv) { #ifdef LOG4CXX_LOGGER auto logger = std::unique_ptr<logger::Log4CXXLogger>( new logger::Log4CXXLogger("log4cxx.properties")); + + if (!utils::appenders_loader.Loaded()) { + SDL_LOG_ERROR("Appenders plugin not loaded, file logging disabled"); + } #else // LOG4CXX_LOGGER auto logger = std::unique_ptr<logger::BoostLogger>( new logger::BoostLogger("boostlogconfig.ini")); @@ -163,12 +167,6 @@ int32_t main(int32_t argc, char** argv) { threads::Thread::SetNameForId(threads::Thread::CurrentId(), "SDLCore"); -#ifdef LOG4CXX_LOGGER - if (!utils::appenders_loader.Loaded()) { - SDL_LOG_ERROR("Appenders plugin not loaded, file logging disabled"); - } -#endif // LOG4CXX_LOGGER - SDL_LOG_INFO("Application started!"); SDL_LOG_INFO("SDL version: " << profile_instance.sdl_version()); |