Merge lp:~hloeung/ubuntu-repository-cache/squid-logging-human-sensible-timestamps into lp:ubuntu-repository-cache

Proposed by Haw Loeung
Status: Merged
Approved by: Haw Loeung
Approved revision: 341
Merged at revision: 338
Proposed branch: lp:~hloeung/ubuntu-repository-cache/squid-logging-human-sensible-timestamps
Merge into: lp:ubuntu-repository-cache
Diff against target: 22 lines (+3/-2)
1 file modified
templates/squid-deb-proxy/squid-deb-proxy.conf (+3/-2)
To merge this branch: bzr merge lp:~hloeung/ubuntu-repository-cache/squid-logging-human-sensible-timestamps
Reviewer Review Type Date Requested Status
Paul Collins lgtm Approve
Canonical IS Reviewers Pending
Review via email: mp+403843@code.launchpad.net

Commit message

Fix squid logging format to use sensible timestamps rather than milliseconds since epoch - LP:1931155 / LP:1780341

To post a comment you must log in.
Revision history for this message
Haw Loeung (hloeung) wrote :

ubuntu@machine-2:~$ sudo tail /var/log/squid-deb-proxy/access.log -f
1623115336.857 24 127.0.0.1 TCP_REFRESH_MODIFIED/200 261 HEAD http://us.archive.ubuntu.com/ubuntu/pool/main/ - HIER_DIRECT/91.189.91.39 text/html
1623115351.854 25 127.0.0.1 TCP_REFRESH_MODIFIED/200 261 HEAD http://us.archive.ubuntu.com/ubuntu/pool/main/ - HIER_DIRECT/91.189.91.39 text/html
1623115366.841 25 127.0.0.1 TCP_REFRESH_MODIFIED/200 261 HEAD http://us.archive.ubuntu.com/ubuntu/pool/main/ - HIER_DIRECT/91.189.91.39 text/html
1623115383.104 1059 127.0.0.1 TCP_REFRESH_MODIFIED/200 261 HEAD http://us.archive.ubuntu.com/ubuntu/pool/main/ - HIER_DIRECT/91.189.91.39 text/html
1623115383.293 1 127.0.0.1 TCP_MEM_HIT/200 638825 GET http://us.archive.ubuntu.com/ubuntu/pool/main/b/bash/bash_5.0-6ubuntu1_amd64.deb - HIER_NONE/- application/x-debian-package
1623115384.464 85 127.0.0.1 TCP_MISS/200 638818 GET http://us.archive.ubuntu.com/ubuntu/pool/main/b/bash/bash_5.0-6ubuntu1_amd64.deb - HIER_DIRECT/91.189.91.39 application/x-debian-package
1623115385.666 61 127.0.0.1 TCP_MEM_HIT/200 17131593 GET http://us.archive.ubuntu.com/ubuntu/pool/universe/u/ubuntu-wallpapers/ubuntu-wallpapers-xenial_20.04.2-0ubuntu1_all.deb - HIER_NONE/- application/x-debian-package
1623115387.123 144 127.0.0.1 TCP_MISS/200 17131586 GET http://us.archive.ubuntu.com/ubuntu/pool/universe/u/ubuntu-wallpapers/ubuntu-wallpapers-xenial_20.04.2-0ubuntu1_all.deb - HIER_DIRECT/91.189.91.39 application/x-debian-package
1623115397.087 41 127.0.0.1 TCP_REFRESH_MODIFIED/200 261 HEAD http://us.archive.ubuntu.com/ubuntu/pool/main/ - HIER_DIRECT/91.189.91.38 text/html
1623115412.077 24 127.0.0.1 TCP_REFRESH_MODIFIED/200 261 HEAD http://us.archive.ubuntu.com/ubuntu/pool/main/ - HIER_DIRECT/91.189.91.38 text/html

2021-06-08 01:23:47 +0000 25 127.0.0.1 TCP_REFRESH_MODIFIED/200 256 HEAD http://us.archive.ubuntu.com/ubuntu/pool/main/ - HIER_DIRECT/91.189.91.38 text/html
2021-06-08 01:24:01 +0000 27 127.0.0.1 TCP_REFRESH_MODIFIED/200 261 HEAD http://us.archive.ubuntu.com/ubuntu/pool/main/ - HIER_DIRECT/91.189.91.38 text/html
2021-06-08 01:24:03 +0000 1 127.0.0.1 TCP_MEM_HIT/200 638825 GET http://us.archive.ubuntu.com/ubuntu/pool/main/b/bash/bash_5.0-6ubuntu1_amd64.deb - HIER_NONE/- application/x-debian-package
2021-06-08 01:24:04 +0000 88 127.0.0.1 TCP_MISS/200 638813 GET http://us.archive.ubuntu.com/ubuntu/pool/main/b/bash/bash_5.0-6ubuntu1_amd64.deb - HIER_DIRECT/91.189.91.38 application/x-debian-package
2021-06-08 01:24:06 +0000 91 127.0.0.1 TCP_MEM_HIT/200 17131593 GET http://us.archive.ubuntu.com/ubuntu/pool/universe/u/ubuntu-wallpapers/ubuntu-wallpapers-xenial_20.04.2-0ubuntu1_all.deb - HIER_NONE/- application/x-debian-package
^C

Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

341. By Haw Loeung

Minus the timezone, which hardly ever changes

Revision history for this message
Paul Collins (pjdc) :
review: Approve (lgtm)
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 338

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'templates/squid-deb-proxy/squid-deb-proxy.conf'
2--- templates/squid-deb-proxy/squid-deb-proxy.conf 2021-03-02 22:24:19 +0000
3+++ templates/squid-deb-proxy/squid-deb-proxy.conf 2021-06-08 01:41:51 +0000
4@@ -1,7 +1,7 @@
5
6 #
7 # JUJU WARNING: This file is managed by Juju, do NOT edit
8-#
9+#
10
11 # WELCOME TO SQUID DEB PROXY
12 # ------------------
13@@ -47,7 +47,8 @@
14
15 # use different logs
16 cache_log /var/log/squid-deb-proxy/cache.log
17-access_log daemon:/var/log/squid-deb-proxy/access.log
18+logformat custom-squid %tg{%F %H:%M:%S} %6tr %>a %Ss/%03>Hs %<st %rm %ru %[un %Sh/%<a %mt
19+access_log daemon:/var/log/squid-deb-proxy/access.log custom-squid
20
21 # tweaks to speed things up
22 {{ Cache_Memory_Config }}

Subscribers

People subscribed via source and target branches