mirror of
https://github.com/LibreOffice/online.git
synced 2025-08-20 23:24:34 +00:00
wsd: flush logs before existing
This is important for when we abort with some explanation.
Often said explanation doesn't show up anywhere to be useful.
Also, issue fatal logs for abnormal exist and use SFL to log errno.
Reviewed-on: https://gerrit.libreoffice.org/57540
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
(cherry picked from commit ad7964393e
)
Change-Id: Ic67064ef40ef6e93d26e5847ecd32bdd49c3cc8b
This commit is contained in:
@ -20,6 +20,7 @@
|
||||
#include <cstring>
|
||||
#include <ctime>
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
@ -182,6 +183,17 @@ namespace Log
|
||||
{
|
||||
return Poco::Logger::get(Source.inited ? Source.name : std::string());
|
||||
}
|
||||
|
||||
void shutdown()
|
||||
{
|
||||
logger().shutdown();
|
||||
|
||||
// Flush
|
||||
std::flush(std::cout);
|
||||
fflush(stdout);
|
||||
std::flush(std::cerr);
|
||||
fflush(stderr);
|
||||
}
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
Reference in New Issue
Block a user