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 53 of file logging.h.

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