3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

SquidのログをLTSVで出す

3
Last updated at Posted at 2014-10-24

設定ファイル

/etc/squid/squid.conf
logformat ltsv src_ip:%>a       src_port:%>p    time:%{%Y/%m/%d %H:%M:%S}tl     req_method:%rm  req_url:%ru     protocol:HTTP/%rv    status_code:%>Hs        referer:"%{Referer}>h"  user-agent:"%{User-Agent}>h"    squid_req_status:%Ss

出力結果

access_ltsv.log
src_ip:192.168.0.185    src_port:49290  time:2014/10/24 18:18:23        req_method:CONNECT      req_url:login.finalfantasyxiv.com:443   protocol:1.1    status_code:200 referer:"-"     user-agent:"LIBRA/1.0"  squid_req_status:TCP_MISS
src_ip:192.168.0.185    src_port:49291  time:2014/10/24 18:18:24        req_method:CONNECT      req_url:login.finalfantasyxiv.com:443   protocol:1.1    status_code:200 referer:"-"     user-agent:"LIBRA/1.0"  squid_req_status:TCP_MISS

簡単ですね。\tが使えないのが面倒ですけども(´・ω・`)

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?