mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-23 06:26:15 +02:00
Logger::writeToStdout(): Use writeFull()
This ensures that write errors do not get ignored.
This commit is contained in:
parent
85dbf9de8e
commit
c13cbd20ab
1 changed files with 3 additions and 2 deletions
|
@ -32,7 +32,8 @@ void Logger::warn(const std::string & msg)
|
||||||
|
|
||||||
void Logger::writeToStdout(std::string_view s)
|
void Logger::writeToStdout(std::string_view s)
|
||||||
{
|
{
|
||||||
std::cout << s << "\n";
|
writeFull(STDOUT_FILENO, s);
|
||||||
|
writeFull(STDOUT_FILENO, "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
class SimpleLogger : public Logger
|
class SimpleLogger : public Logger
|
||||||
|
@ -84,7 +85,7 @@ public:
|
||||||
|
|
||||||
void startActivity(ActivityId act, Verbosity lvl, ActivityType type,
|
void startActivity(ActivityId act, Verbosity lvl, ActivityType type,
|
||||||
const std::string & s, const Fields & fields, ActivityId parent)
|
const std::string & s, const Fields & fields, ActivityId parent)
|
||||||
override
|
override
|
||||||
{
|
{
|
||||||
if (lvl <= verbosity && !s.empty())
|
if (lvl <= verbosity && !s.empty())
|
||||||
log(lvl, s + "...");
|
log(lvl, s + "...");
|
||||||
|
|
Loading…
Reference in a new issue