ONE - On-device Neural Engine
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 52 of file logging.h.

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