mirror of
https://github.com/aria2/aria2.git
synced 2025-04-05 13:37:40 +03:00
Add --stderr option to redirect all stdout log output to stderr
This commit is contained in:
parent
aa863fa4d1
commit
db239c2853
7 changed files with 27 additions and 0 deletions
|
@ -47,6 +47,7 @@ namespace global {
|
|||
namespace {
|
||||
Console consoleCout;
|
||||
Console consoleCerr;
|
||||
Console consoleCoutBackup;
|
||||
};
|
||||
|
||||
void initConsole(bool suppress)
|
||||
|
@ -65,6 +66,12 @@ void initConsole(bool suppress)
|
|||
}
|
||||
}
|
||||
|
||||
void redirectStdoutToStderr()
|
||||
{
|
||||
consoleCoutBackup = std::move(consoleCout);
|
||||
consoleCout = consoleCerr;
|
||||
}
|
||||
|
||||
const Console& cout() { return consoleCout; }
|
||||
|
||||
const Console& cerr() { return consoleCerr; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue