Skip to content

Commit

Permalink
[XrdCl] Allow exxternal components to register new topics in XrdCl::Log.
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmichal committed Jan 11, 2021
1 parent a7c1fca commit e8e9cd2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/XrdCl/XrdClLog.hh
Expand Up @@ -79,6 +79,7 @@ namespace XrdCl
//------------------------------------------------------------------------
void Close();
virtual void Write( const std::string &message );

private:
int pFileDes;
};
Expand Down Expand Up @@ -222,6 +223,17 @@ namespace XrdCl
//------------------------------------------------------------------------
void SetTopicName( uint64_t topic, std::string name );


//------------------------------------------------------------------------
//! Register new topic
//------------------------------------------------------------------------
inline uint64_t RegisterTopic( const std::string &topic )
{
uint64_t tpcnb = pTopicMap.rbegin()->first << 1;
SetTopicName( tpcnb, topic );
return tpcnb;
}

//------------------------------------------------------------------------
//! Get the log level
//------------------------------------------------------------------------
Expand Down

0 comments on commit e8e9cd2

Please sign in to comment.