ArmNN
 24.08
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)
 
SimpleLogger< LogSeverity::Debug > & Get ()
 
SimpleLogger< LogSeverity::Trace > & Get ()
 
SimpleLogger< LogSeverity::Info > & Get ()
 
SimpleLogger< LogSeverity::Warning > & Get ()
 
SimpleLogger< LogSeverity::Error > & Get ()
 
SimpleLogger< LogSeverity::Fatal > & Get ()
 

Static Public Member Functions

static SimpleLoggerGet ()
 

Detailed Description

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

Definition at line 157 of file Logging.hpp.

Constructor & Destructor Documentation

◆ SimpleLogger()

SimpleLogger ( )
inline

Definition at line 160 of file Logging.hpp.

161  : m_Sinks{std::make_shared<StandardOutputSink>()}
162  , m_Enable(true)
163  {
164  }

Member Function Documentation

◆ AddSink()

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

Definition at line 183 of file Logging.hpp.

184  {
185  m_Sinks.push_back(sink);
186  }

Referenced by armnn::SetLoggingSinks().

◆ Enable()

void Enable ( bool  enable = true)
inline

Definition at line 168 of file Logging.hpp.

169  {
170  m_Enable = enable;
171  }

Referenced by armnn::SetLogFilter().

◆ Get() [1/7]

Definition at line 32 of file Logging.cpp.

33 {
34  static SimpleLogger<LogSeverity::Debug> logger;
35  return logger;
36 }

◆ Get() [2/7]

Definition at line 39 of file Logging.cpp.

40 {
41  static SimpleLogger<LogSeverity::Trace> logger;
42  return logger;
43 }

◆ Get() [3/7]

Definition at line 46 of file Logging.cpp.

47 {
48  static SimpleLogger<LogSeverity::Info> logger;
49  return logger;
50 }

◆ Get() [4/7]

Definition at line 53 of file Logging.cpp.

54 {
55  static SimpleLogger<LogSeverity::Warning> logger;
56  return logger;
57 }

◆ Get() [5/7]

Definition at line 60 of file Logging.cpp.

61 {
62  static SimpleLogger<LogSeverity::Error> logger;
63  return logger;
64 }

◆ Get() [6/7]

Definition at line 67 of file Logging.cpp.

68 {
69  static SimpleLogger<LogSeverity::Fatal> logger;
70  return logger;
71 }

◆ Get() [7/7]

SimpleLogger< Level > & Get
static

Definition at line 25 of file Logging.cpp.

26 {
27  static SimpleLogger<Level> logger;
28  return logger;
29 }

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

◆ RemoveAllSinks()

void RemoveAllSinks ( )
inline

Definition at line 178 of file Logging.hpp.

179  {
180  m_Sinks.clear();
181  }

Referenced by armnn::SetLoggingSinks().

◆ StartNewRecord()

ScopedRecord StartNewRecord ( )
inline

Definition at line 173 of file Logging.hpp.

174  {
175  return ScopedRecord(m_Sinks, Level, m_Enable);
176  }

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