10 #if defined(__FastCaloSimStandAlone__)
24 return this->
stream(lvl,
"", -1);
35 return *m_null_msg_ptr;
37 if (this->streamerNeedStart(lvl,
file)) {
39 if (this->streamerInLine())
40 std::cout << this->streamerEndLine(lvl);
42 this->streamerInLine(
true);
50 return m_level <= lvl;
64 std::string MLogging::streamerEndLine(
MSG::Level lvl)
const {
66 m_streamer_in_line =
false;
73 void MLogging::streamerInLine(
bool is_in_line)
const {
74 m_streamer_in_line = is_in_line;
78 bool MLogging::streamerNeedStart(
MSG::Level lvl, std::string
file)
const {
80 if (lvl == m_streamer_has_lvl &&
file == m_streamer_from_file &&
84 m_streamer_from_file =
file;
85 m_streamer_has_lvl = lvl;
89 #else // For inside Athena
112 #endif // End inside Athena
120 auto last_slash =
file.find_last_of(
'/');
121 int path_len = last_slash == std::string::npos ? 0 : last_slash;
122 int trim_point = path_len;
123 int total_len =
file.length();
124 if (total_len - path_len > col1_len)
125 trim_point = total_len - col1_len;
126 std::string trimmed_name =
file.substr(trim_point);
128 "NIL",
"VERBOSE",
"DEBUG",
"INFO",
"WARNING",
"ERROR",
"FATAL",
"ALWAYS"};
129 std::string
level = LevelNames[lvl];
130 std::string level_string = std::string(
"(") +
level +
") ";
132 output << std::setw(col1_len) << std::right << trimmed_name <<
":"
133 << std::setw(col2_len) << std::left <<
line << std::setw(col3_len)
134 << std::right << level_string;