ONE - On-device Neural Engine
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
onert::util::logging::Context Class Reference

#include <logging.h>

Public Member Functions

 Context () noexcept
 
bool enabled (void) const
 

Static Public Member Functions

static Contextget () noexcept
 

Detailed Description

Definition at line 28 of file logging.h.

Constructor & Destructor Documentation

◆ Context()

onert::util::logging::Context::Context ( )
inlinenoexcept

Definition at line 31 of file logging.h.

31 : _enabled{false}
32 {
33 const auto env = util::getConfigBool(util::config::ONERT_LOG_ENABLE);
34
35 if (env)
36 {
37 _enabled = true;
38 }
39 }
bool getConfigBool(const std::string &key)

Member Function Documentation

◆ enabled()

bool onert::util::logging::Context::enabled ( void  ) const
inline

Definition at line 44 of file logging.h.

44{ return _enabled; }

◆ get()

onert::util::logging::Context & onert::util::logging::Context::get ( )
staticnoexcept

Definition at line 19 of file logging.cc.

20{
21 static Context ctx;
22 return ctx;
23}

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