- 追加された行はこの色です。
- 削除された行はこの色です。
#author("2020-11-23T09:58:35+09:00","default:ryuichi","ryuichi")
#author("2020-11-23T10:19:23+09:00","default:ryuichi","ryuichi")
* ログ設定 [#h7a9b043]
** 例 [#cc481987]
logformat xlogformat %{%Y-%m-%dT%H:%M:%S}tl %6tr %>a %>A %Ss/%03>Hs %<st %rm %ru %[un %Sh/%<a %mt
access_log daemon:/var/log/squid/access.log xlogformat
- logformatでフォーマットを任意の名前で指定する。ここでは'''xlogfmat'''
- 次にaccess_logでログファイルのパスと上のフォーマット名を指定する
- '''>A'''は接続元IPアドレスのFQDNだけどDNSルックアップが発生して遅くなるのかも?
- '''tl'''でタイムスタンプの書式を指定する。'''{%Y-%m-%dT%H:%M:%S}'''の中の書式は次を参照する https://linuxjm.osdn.jp/html/LDP_man-pages/man3/strftime.3.html
** 参考 [#zd014633]
*** logformat [#r500b5c8]
http://www.squid-cache.org/Doc/config/logformat/
*** access_log [#s93a4784]
http://www.squid-cache.org/Doc/config/access_log/