ArmNN  NotReleased
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 103 of file Logging.hpp.

Constructor & Destructor Documentation

◆ SimpleLogger()

SimpleLogger ( )
inline

Definition at line 106 of file Logging.hpp.

107  : m_Sinks{std::make_shared<StandardOutputSink>()}
108  , m_Enable(true)
109  {
110  }

Member Function Documentation

◆ AddSink()

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

Definition at line 134 of file Logging.hpp.

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

Referenced by armnn::SetLoggingSinks().

135  {
136  m_Sinks.push_back(sink);
137  }

◆ Enable()

void Enable ( bool  enable = true)
inline

Definition at line 118 of file Logging.hpp.

Referenced by armnn::SetLogFilter().

119  {
120  m_Enable = enable;
121  }

◆ Get()

static SimpleLogger& Get ( )
inlinestatic

Definition at line 112 of file Logging.hpp.

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

113  {
114  static SimpleLogger<Level> logger;
115  return logger;
116  }

◆ RemoveAllSinks()

void RemoveAllSinks ( )
inline

Definition at line 129 of file Logging.hpp.

Referenced by armnn::SetLoggingSinks().

130  {
131  m_Sinks.clear();
132  }

◆ StartNewRecord()

ScopedRecord StartNewRecord ( )
inline

Definition at line 123 of file Logging.hpp.

124  {
125  ScopedRecord record(m_Sinks, Level, m_Enable);
126  return record;
127  }

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