Fix log truncation
Syslog wasn't truncated which caused massive disk space usage when the full test set was run. Also removed the creation of empty log files if no messages were logged during the run.
This commit is contained in:
parent
85c2d3c9ee
commit
805e7975f5
@ -801,11 +801,16 @@ void TestConnections::copy_one_mariadb_log(int i, std::string filename)
|
||||
|
||||
for (auto cmd : log_retrive_commands)
|
||||
{
|
||||
std::ofstream outfile(filename + std::to_string(j++));
|
||||
auto output = repl->ssh_output(cmd, i).second;
|
||||
|
||||
if (outfile)
|
||||
if (!output.empty())
|
||||
{
|
||||
outfile << repl->ssh_output(cmd, i).second;
|
||||
std::ofstream outfile(filename + std::to_string(j++));
|
||||
|
||||
if (outfile)
|
||||
{
|
||||
outfile << output;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user