openMSX
StdioMessages.cc
Go to the documentation of this file.
1#include "StdioMessages.hh"
2#include <iostream>
3
4namespace openmsx {
5
6void 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
14void 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 std::span< const std::string_view, NUM_LEVELS > getLevelStrings()
Definition: CliComm.hh:88
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