免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1502 | 回复: 7
打印 上一主题 下一主题

[proxy] squid 的日志问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-01-23 09:25 |只看该作者 |倒序浏览
请问如何设置才能不产生squid的 access.log 和 cache.log?

论坛徽章:
0
2 [报告]
发表于 2006-01-23 13:14 |只看该作者
#cache_log
#cache_access_log
就可以了

论坛徽章:
0
3 [报告]
发表于 2006-01-23 16:26 |只看该作者
原帖由 windyzhang 于 2006-1-23 13:14 发表
#cache_log
#cache_access_log
就可以了


好象不行,它会默认在$SQUID_HOME下的var/logs/产生cache.log与access.log的

论坛徽章:
0
4 [报告]
发表于 2006-01-23 20:41 |只看该作者
cache_log none
cache_access_log none

但建议cache_log留着DEBUG用

论坛徽章:
0
5 [报告]
发表于 2006-01-23 23:33 |只看该作者
cache_log /dev/null
cache_access_log /dev/null

论坛徽章:
0
6 [报告]
发表于 2006-01-24 11:41 |只看该作者
原帖由 LEOD 于 2006-1-23 20:41 发表
cache_log none
cache_access_log none

但建议cache_log留着DEBUG用


正解

论坛徽章:
0
7 [报告]
发表于 2006-01-24 11:56 |只看该作者
多谢各位指点,问题解决。呵呵

论坛徽章:
0
8 [报告]
发表于 2006-01-25 09:42 |只看该作者
How can I disable Squid's log files?
For Squid 2.4:

To disable access.log:

        cache_access_log /dev/null


To disable store.log:

        cache_store_log none


To disable cache.log:

        cache_log /dev/null


For Squid 2.5:

To disable access.log:

        cache_access_log none


To disable store.log:

        cache_store_log none


To disable cache.log:

        cache_log /dev/null


Note : It is a bad idea to disable the cache.log because this file contains many important status and debugging messages. However, if you really want to, you can.

Warning : If /dev/null is specified to any of the above log files, logfile rotate must also be set to 0 or else risk Squid rotating away /dev/null making it a plain log file.

Tip : Instead of disabling the log files, it is advisable to use a smaller value for logfile_rotate and properly rotating Squid's log files in your cron. That way, your log files are more controllable and self-maintained by your system.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP