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

Data Structures

class  Context
 

Functions

std::string decorated_name (const char *input)
 

Function Documentation

◆ decorated_name()

std::string onert::util::logging::decorated_name ( const char *  input)
inline

Definition at line 56 of file logging.h.

57{
58 const int min_prefix = 16;
59 std::string prefix(input);
60 auto len_prefix = prefix.size();
61 if (len_prefix > min_prefix)
62 return "[" + prefix + "] ";
63 std::string spaces((min_prefix - len_prefix) / 2, ' ');
64 return (len_prefix % 2 ? "[ " : "[") + spaces + prefix + spaces + "] ";
65}