development/Common/Utility/source/LoggerCpp/Manager.cpp
// Return the Channel corresponding to the provided name

Return the Channel corresponding to the provided name
Return the Channel corresponding to the provided name
yaget::ylog::Channel::Ptr yaget::ylog::Manager::get(const char* apChannelName)
{
    auto& d = md();
    ylog::Channel::Ptr ChannelPtr;
    if (const auto iChannelPtr = d.mChannelMap.find(apChannelName); d.mChannelMap.end() != iChannelPtr)
    {
        ChannelPtr = iChannelPtr->second;
    }
    else
    {
        ChannelPtr.reset(new ylog::Channel(apChannelName, d.mDefaultLevel));
        d.mChannelMap[apChannelName] = ChannelPtr;
    }
    return ChannelPtr;
}
yaget :: ylog :: Channel :: Ptr yaget :: ylog :: Manager :: get ( const char * apChannelName ) { auto & d = md ( ) ; ylog :: Channel :: Ptr ChannelPtr ; if ( const auto iChannelPtr = d . mChannelMap . find ( apChannelName ) ; d . mChannelMap . end ( ) != iChannelPtr ) { ChannelPtr = iChannelPtr -> second ; } else { ChannelPtr . reset ( new ylog :: Channel ( apChannelName , d . mDefaultLevel ) ) ; d . mChannelMap [ apChannelName ] = ChannelPtr ; } return ChannelPtr ; }
Return the Channel corresponding to the provided name
Return the Channel corresponding to the provided name
/// @todo Add a basic thread-safety security (throw if multiple threads create Loggers)
