ONE - On-device Neural Engine
Loading...
Searching...
No Matches
onert::util::logging::Context Class Reference

#include <logging.h>

Public Member Functions

 Context () noexcept
 
bool enabled (void) const
 
void update (void)
 

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::ENABLE_LOG);
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}

◆ update()

void onert::util::logging::Context::update ( void  )
inline

Definition at line 45 of file logging.h.

45{ _enabled = util::getConfigBool(util::config::ENABLE_LOG); }

References onert::util::getConfigBool().


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