Log file need limit size
来源:互联网 发布:金融信用信息基础数据库查询 编辑:程序博客网 时间:2024/04/29 03:38
1. Background
Recently, I develop a software, which can log data into a txt file. But finding that this software will crash after long time test about 2 days. After analysing and debugging, find the root reason is that software can’t open the log file immediately under this log rate. Because the log file become very big after long time logging.
2. Limit log file size
When implementing log function, should consider limit the log file size. The flow chart diagram is show as below.
Getting file size can use the following code:
CFileStatus fStatus;long lFileSize;CFile::GetStatus("FilePath+FileName", fStatus);lFileSize=fStatus.m_size;
0 0
- Log file need limit size
- “File Size Limit Exceeded”问题
- "File size limit exceeded" 问题
- (转)File size limit exceeded
- Solve Linux 2G File Size Limit
- File size limit exceeded (core dump)
- 遭遇File size limit exceeded错误
- DB File Size limit
- (笔记)File size limit exceeded (core dumped)解决方法
- Intellij IDEA中file size exceeds configured limit解决
- gcc: 内部错误:文件大小超出限制 gcc: Internal error: File size limit exceeded
- linux下创建大于2G文件时报File Size Limit Exceeded
- Github 修正上传时“this exceeds GitHub’s file size limit of 100 MB”错误
- Github 修正上传时“this exceeds GitHub’s file size limit of 100 MB”错误
- this exceeds GitHub’s file size limit of 100Mb 问题
- File size exceeds configured limit (2560000), code insight features not available
- AS项目运行正常,但查看代码飘红the file size exceeds configured limit.
- File size exceeds configured limit (2560000), code insight features not available
- windows server 下搭建SVN遇到的坑
- Linux 主机 yum安装zabbix-agent客户端
- neo4j: A simple example using the JDBC driver
- 2016年读书计划
- Javascript定义类(class)的三种方法
- Log file need limit size
- leetcode之House Robber II
- Redis与Reactor模式
- Axis2发布WebService服务
- Server Tomcat v7.0 Server at localhost failed to start.
- git/github/MyEclipse结合使用
- 嵌入式开发
- AVPlayer实现简单播放器
- 会计原理--总论