modify log info.

This commit is contained in:
pandx 2024-11-07 11:21:55 +08:00
parent 43d27759e4
commit 8d0f02f736

View File

@ -393,9 +393,9 @@ void CleanLogFile(std::string log_dir, size_t retain) {
void DiskSpaceCheck() {
std::string directory = "/opt/log";
while (1) {
boost::filesystem::space_info si = boost::filesystem::space("/opt");
zlog_warn(zct, "disk free space:%llu for /opt", si.free);
if (si.free <= 20000000) {
boost::filesystem::space_info si = boost::filesystem::space("/opt");
if (si.free <= 20000000) {
zlog_warn(zct, "disk free space:%llu for /opt", si.free);
CleanLogFile(directory, 10);
boost::filesystem::space_info si1 = boost::filesystem::space("/opt");
if (si1.free <= 20000000) {