modify log info.
This commit is contained in:
parent
43d27759e4
commit
8d0f02f736
@ -393,9 +393,9 @@ void CleanLogFile(std::string log_dir, size_t retain) {
|
|||||||
void DiskSpaceCheck() {
|
void DiskSpaceCheck() {
|
||||||
std::string directory = "/opt/log";
|
std::string directory = "/opt/log";
|
||||||
while (1) {
|
while (1) {
|
||||||
boost::filesystem::space_info si = boost::filesystem::space("/opt");
|
boost::filesystem::space_info si = boost::filesystem::space("/opt");
|
||||||
zlog_warn(zct, "disk free space:%llu for /opt", si.free);
|
if (si.free <= 20000000) {
|
||||||
if (si.free <= 20000000) {
|
zlog_warn(zct, "disk free space:%llu for /opt", si.free);
|
||||||
CleanLogFile(directory, 10);
|
CleanLogFile(directory, 10);
|
||||||
boost::filesystem::space_info si1 = boost::filesystem::space("/opt");
|
boost::filesystem::space_info si1 = boost::filesystem::space("/opt");
|
||||||
if (si1.free <= 20000000) {
|
if (si1.free <= 20000000) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user