【发布时间】:2015-03-05 16:37:45
【问题描述】:
我在 Ubuntu 实例中运行 wso2bam-2.4.1。以下是日志文件夹结构。如您所见,wso2carbon.log.2015-03-02 为 22GB。
-rw-r--r-- 1 root root 0 Feb 6 10:54 wso2carbon-trace-messages.log
-rw-r--r-- 1 root root 0 Feb 6 10:54 tm.out
-rw-r--r-- 1 root root 0 Feb 6 10:54 audit.log
-rw-r--r-- 1 root root 0 Feb 6 10:55 http_access_2015-02-06.log
-rw-r--r-- 1 root root 809K Feb 6 23:59 wso2carbon.log.2015-02-06
-rw-r--r-- 1 root root 792K Feb 7 23:59 wso2carbon.log.2015-02-07
-rw-r--r-- 1 root root 792K Feb 8 23:59 wso2carbon.log.2015-02-08
-rw-r--r-- 1 root root 0 Feb 9 13:34 http_access_2015-02-09.log
-rw-r--r-- 1 root root 11M Feb 9 23:59 wso2carbon.log.2015-02-09
-rw-r--r-- 1 root root 21K Feb 10 10:03 patches.log
-rw-r--r-- 1 root root 0 Feb 10 10:03 http_access_2015-02-10.log
-rw-r--r-- 1 root root 923K Feb 10 23:59 wso2carbon.log.2015-02-10
-rw-r--r-- 1 root root 188K Feb 12 23:57 wso2carbon.log.2015-02-11
-rw-r--r-- 1 root root 188K Feb 13 23:57 wso2carbon.log.2015-02-12
-rw-r--r-- 1 root root 188K Feb 14 23:57 wso2carbon.log.2015-02-13
-rw-r--r-- 1 root root 188K Feb 15 23:57 wso2carbon.log.2015-02-14
-rw-r--r-- 1 root root 189K Feb 16 23:57 wso2carbon.log.2015-02-15
-rw-r--r-- 1 root root 187K Feb 17 23:57 wso2carbon.log.2015-02-16
-rw-r--r-- 1 root root 190K Feb 18 23:57 wso2carbon.log.2015-02-17
-rw-r--r-- 1 root root 187K Feb 19 23:57 wso2carbon.log.2015-02-18
-rw-r--r-- 1 root root 792K Feb 19 23:59 wso2carbon.log.2015-02-19
-rw-r--r-- 1 root root 186K Feb 21 23:57 wso2carbon.log.2015-02-20
-rw-r--r-- 1 root root 186K Feb 22 23:57 wso2carbon.log.2015-02-21
-rw-r--r-- 1 root root 186K Feb 23 23:57 wso2carbon.log.2015-02-22
-rw-r--r-- 1 root root 187K Feb 24 23:57 wso2carbon.log.2015-02-23
-rw-r--r-- 1 root root 192K Feb 25 23:57 wso2carbon.log.2015-02-24
-rw-r--r-- 1 root root 189K Feb 26 23:58 wso2carbon.log.2015-02-25
-rw-r--r-- 1 root root 792K Feb 26 23:59 wso2carbon.log.2015-02-26
-rw-r--r-- 1 root root 792K Feb 27 23:59 wso2carbon.log.2015-02-27
-rw-r--r-- 1 root root 792K Feb 28 23:59 wso2carbon.log.2015-02-28
-rw-r--r-- 1 root root 191K Mar 2 23:58 wso2carbon.log.2015-03-01
-rw-r--r-- 1 root root 518K Mar 3 15:56 wso2carbon.log.2015-03-03
-rw-r--r-- 1 root root 22G Mar 3 23:59 wso2carbon.log.2015-03-02
-rw-r--r-- 1 root root 20K Mar 4 08:38 wso2carbon.log
问题是有些日志文件真的很大,以至于我不得不反复升级服务器磁盘空间。我的问题是
- 如何压缩最近三个月内的日志?
- 如何在 3 个月后删除日志?
- 有哪些方法可以解决此日志大小问题?
如果可能,请提供指导
另请参阅与 WSO2 ESB 相关的这个问题。
【问题讨论】:
标签: java logging wso2 wso2carbon wso2bam