| 170 | |
| 171 | = logformat = |
| 172 | * [http://www.squid-cache.org/Doc/config/logformat/ squid : logformat configuration directive] |
| 173 | |
| 174 | * default |
| 175 | {{{ |
| 176 | logformat squid %ts.%03tu %6tr %>a %Ss/%03>Hs %<st %rm %ru %un %Sh/%<A %mt |
| 177 | }}} |
| 178 | {{{ |
| 179 | 1356979268.589 35 192.168.X.Y TCP_MISS/200 1541 GET http://lab.mitty.jp/ - DIRECT/219.94.241.246 text/html |
| 180 | }}} |
| 181 | * common+ |
| 182 | {{{ |
| 183 | logformat commonplus %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st %Ss:%Sh/%<A %mt |
| 184 | }}} |
| 185 | {{{ |
| 186 | 192.168.X.Y - - [01/Jan/2013:03:14:12 +0900] "GET http://lab.mitty.jp/ HTTP/1.1" 200 1549 TCP_MEM_HIT:NONE/- text/html |
| 187 | }}} |
| 188 | * ISO 8601 strftime |
| 189 | {{{ |
| 190 | logformat squidmod [%{%Y-%m-%dT%H:%M:%S%z}tl] %>a %un %Ss:%Sh/%<A "%rm %ru HTTP/%rv" %>Hs %<st %mt |
| 191 | }}} |
| 192 | {{{ |
| 193 | [2013-01-01T03:39:00+0900] A.X.Y.Z mitty TCP_MEM_HIT:NONE/- "GET http://lab.mitty.jp/ HTTP/1.1" 200 1548 text/html |
| 194 | }}} |
| 195 | * [http://squid-web-proxy-cache.1019090.n4.nabble.com/Modifying-the-log-format-td3161221.html Squid - Users - Modifying the log format] |