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
 

Static Public Member Functions

static Contextget () noexcept
 

Detailed Description

Definition at line 32 of file logging.h.

Constructor & Destructor Documentation

◆ Context()

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

Definition at line 35 of file logging.h.

35 : _enabled{false}
36 {
37 const auto env = util::getConfigBool(util::config::ONERT_LOG_ENABLE);
38
39 if (env)
40 {
41 _enabled = true;
42 }
43 }
bool getConfigBool(const std::string &key)

Member Function Documentation

◆ enabled()

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

Definition at line 48 of file logging.h.

48{ 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: