diff options
author | VladSemenyuk <VSemenyuk@luxoft.com> | 2020-09-01 20:35:06 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-01 13:35:06 -0400 |
commit | 062d3b0f2a6eb2185d14dc80a885cdfe4860ce23 (patch) | |
tree | 766c4725b8b129cec2d420ff65ae7e9731e91194 /src/components/utils/src/conditional_variable_boost.cc | |
parent | 79fb6408810d776278bf3499c5273eb04159b076 (diff) | |
download | sdl_core-062d3b0f2a6eb2185d14dc80a885cdfe4860ce23.tar.gz |
[SDL 0046] Implement logger abstraction (#3472)
* Implement logger abstraction. Integrate it to SDL.
Create one logger instance for shared libraries
* Rename all logger macros.
* Update src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/resource_allocation_manager_impl.cc
Co-authored-by: Shobhit Adlakha <ShobhitAd@users.noreply.github.com>
* Fix review comments(errors in log messages)
* Fix review coments
* Fix code style
* Add logger variable creation to new commads
* Fix review comment
* Fixe review comment(class imblemtation moved to .cc file)
Co-authored-by: Shobhit Adlakha <ShobhitAd@users.noreply.github.com>
Diffstat (limited to 'src/components/utils/src/conditional_variable_boost.cc')
-rw-r--r-- | src/components/utils/src/conditional_variable_boost.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/components/utils/src/conditional_variable_boost.cc b/src/components/utils/src/conditional_variable_boost.cc index c70b727d66..81fad8ebe7 100644 --- a/src/components/utils/src/conditional_variable_boost.cc +++ b/src/components/utils/src/conditional_variable_boost.cc @@ -46,7 +46,7 @@ const long kNanosecondsPerMillisecond = 1000000; namespace sync_primitives { -CREATE_LOGGERPTR_GLOBAL(logger_, "Utils") +SDL_CREATE_LOG_VARIABLE("Utils") ConditionalVariable::ConditionalVariable() {} @@ -75,13 +75,13 @@ bool ConditionalVariable::Wait(BaseLock& lock) { cond_var_.wait<boost::recursive_mutex>(test_rec_lock->mutex_); } else { // unknown, give up the lock - LOG4CXX_ERROR(logger_, "Unknown lock type!"); + SDL_LOG_ERROR("Unknown lock type!"); NOTREACHED(); } lock.AssertFreeAndMarkTaken(); } catch (const boost::exception& error) { std::string error_string = boost::diagnostic_information(error); - LOG4CXX_FATAL(logger_, error_string); + SDL_LOG_FATAL(error_string); NOTREACHED(); } return true; @@ -115,7 +115,7 @@ ConditionalVariable::WaitStatus ConditionalVariable::WaitFor( test_rec_lock->mutex_, boost::posix_time::milliseconds(milliseconds)); } else { // this is an unknown lock, we have an issue - LOG4CXX_ERROR(logger_, "Unknown lock type!"); + SDL_LOG_ERROR("Unknown lock type!"); NOTREACHED(); } @@ -125,7 +125,7 @@ ConditionalVariable::WaitStatus ConditionalVariable::WaitFor( lock.AssertFreeAndMarkTaken(); } catch (const boost::exception& error) { std::string error_string = boost::diagnostic_information(error); - LOG4CXX_FATAL(logger_, error_string); + SDL_LOG_FATAL(error_string); NOTREACHED(); } |