ONE - On-device Neural Engine
Loading...
Searching...
No Matches
circlechef::LoggingContext Struct Reference

Global logging context. More...

#include <LoggingContext.h>

Static Public Member Functions

static hermes::Contextget (void)
 

Detailed Description

Global logging context.

Definition at line 28 of file LoggingContext.h.

Member Function Documentation

◆ get()

hermes::Context * circlechef::LoggingContext::get ( void  )
static

Definition at line 27 of file LoggingContext.cpp.

28{
29 static hermes::Context *ctx = nullptr;
30
31 if (ctx == nullptr)
32 {
33 ctx = new hermes::Context;
34 ctx->sinks()->append(std::make_unique<hermes::ConsoleReporter>());
35 ctx->config(std::make_unique<LoggerConfig>());
36 }
37
38 return ctx;
39}
Logging controller.
Definition Context.h:40
Sink::Registry * sinks(void)
Definition Context.h:64
const Config * config(void) const
Get the global configuration.
Definition Context.cpp:24
virtual void append(std::unique_ptr< Sink > &&)=0

References hermes::Sink::Registry::append(), hermes::Context::config(), and hermes::Context::sinks().


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