openMSX
StdioMessages.cc
Go to the documentation of this file.
1 #include "StdioMessages.hh"
2 #include <iostream>
3 
4 namespace openmsx {
5 
6 void StdioMessages::log(CliComm::LogLevel level, std::string_view message) noexcept
7 {
8  auto levelStr = CliComm::getLevelStrings();
9  ((level == CliComm::INFO) ? std::cout : std::cerr) <<
10  levelStr[level] << ": " << message << '\n' << std::flush;
11 
12 }
13 
14 void StdioMessages::update(CliComm::UpdateType /*type*/, std::string_view /*machine*/,
15  std::string_view /*name*/, std::string_view /*value*/) noexcept
16 {
17  // ignore
18 }
19 
20 } // namespace openmsx
static span< const char *const > getLevelStrings()
Definition: CliComm.hh:82
void update(CliComm::UpdateType type, std::string_view machine, std::string_view name, std::string_view value) noexcept override
void log(CliComm::LogLevel level, std::string_view message) noexcept override
Definition: StdioMessages.cc:6
This file implemented 3 utility functions:
Definition: Autofire.cc:9