lighttpd 日志格式设置

lighttpd 日志格式设置

:

lighttpd的日志格式是可以自己定义的,通过在lighttpd 的配置文件 lighttpd.conf 中通过 accesslog.format 参数来指定

支持的参数含义如下:

 

  1. %%     a percent sign  
  2. %h     name or address of remote-host  
  3. %l     ident name (not supported)  
  4. %u     authenticated user  
  5. %t     timestamp of the end-time of the request  
  6. %r     request-line   
  7. %s     status code   
  8. %b     bytes sent for the body  
  9. %i     HTTP-header field  
  10. %a     remote address  
  11. %A     local address  
  12. %B     same as %b  
  13. %C     cookie field (not supported)  
  14. %D     time used in ms (not supported)  
  15. %e     environment  
  16. %f     physical filename  
  17. %H     request protocol (HTTP/1.0, ...)  
  18. %m     request method (GET, POST, ...)  
  19. %n     (not supported)  
  20. %o     `response header`_  
  21. %p     server port  
  22. %P     (not supported)  
  23. %q     query string  
  24. %T     time used in seconds  
  25. %U     request URL  
  26. %v     server-name  
  27. %V     HTTP request host name  
  28. %X     connection status  
  29. %I     bytes incomming  
  30. %O     bytes outgoing  


参数示例:
accesslog.format = "%h %l %u %t \"%m http://%v%U?%q %H\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{my_uniq_ckid}C\""

 日志内容示例:

127.0.0.1 - - [28/Apr/2012:17:42:50 +0800] "GET http://www.sample.com/? HTTP/1.1" 200 0 "-" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; InfoPath.2)" "-"


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值