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:
@ -800,12 +800,17 @@ void TestConnections::copy_one_mariadb_log(int i, std::string filename)
|
|||||||
int j = 1;
|
int j = 1;
|
||||||
|
|
||||||
for (auto cmd : log_retrive_commands)
|
for (auto cmd : log_retrive_commands)
|
||||||
|
{
|
||||||
|
auto output = repl->ssh_output(cmd, i).second;
|
||||||
|
|
||||||
|
if (!output.empty())
|
||||||
{
|
{
|
||||||
std::ofstream outfile(filename + std::to_string(j++));
|
std::ofstream outfile(filename + std::to_string(j++));
|
||||||
|
|
||||||
if (outfile)
|
if (outfile)
|
||||||
{
|
{
|
||||||
outfile << repl->ssh_output(cmd, i).second;
|
outfile << output;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user