ArmNN
 21.02
SimpleLogger< Level > Class Template Reference

#include <Logging.hpp>

Public Member Functions

 SimpleLogger ()
 
void Enable (bool enable=true)
 
ScopedRecord StartNewRecord ()
 
void RemoveAllSinks ()
 
void AddSink (std::shared_ptr< LogSink > sink)
 

Static Public Member Functions

static SimpleLoggerGet ()
 

Detailed Description

template<LogSeverity Level>
class armnn::SimpleLogger< Level >

Definition at line 142 of file Logging.hpp.

Constructor & Destructor Documentation

◆ SimpleLogger()

SimpleLogger ( )
inline

Definition at line 145 of file Logging.hpp.

146  : m_Sinks{std::make_shared<StandardOutputSink>()}
147  , m_Enable(true)
148  {
149  }

Member Function Documentation

◆ AddSink()

void AddSink ( std::shared_ptr< LogSink sink)
inline

Definition at line 173 of file Logging.hpp.

References armnn::SetAllLoggingSinks(), and armnn::SetLogFilter().

Referenced by armnn::SetLoggingSinks().

174  {
175  m_Sinks.push_back(sink);
176  }

◆ Enable()

void Enable ( bool  enable = true)
inline

Definition at line 157 of file Logging.hpp.

Referenced by armnn::SetLogFilter().

158  {
159  m_Enable = enable;
160  }

◆ Get()

static SimpleLogger& Get ( )
inlinestatic

Definition at line 151 of file Logging.hpp.

Referenced by armnn::SetLogFilter(), and armnn::SetLoggingSinks().

152  {
153  static SimpleLogger<Level> logger;
154  return logger;
155  }

◆ RemoveAllSinks()

void RemoveAllSinks ( )
inline

Definition at line 168 of file Logging.hpp.

Referenced by armnn::SetLoggingSinks().

169  {
170  m_Sinks.clear();
171  }

◆ StartNewRecord()

ScopedRecord StartNewRecord ( )
inline

Definition at line 162 of file Logging.hpp.

163  {
164  ScopedRecord record(m_Sinks, Level, m_Enable);
165  return record;
166  }

The documentation for this class was generated from the following file: