Merge lp:~allenap/maas/make-web-access-logs-prettier into lp:~maas-committers/maas/trunk
Proposed by
Gavin Panella
Status: | Merged |
---|---|
Approved by: | Gavin Panella |
Approved revision: | no longer in the source branch. |
Merged at revision: | 5897 |
Proposed branch: | lp:~allenap/maas/make-web-access-logs-prettier |
Merge into: | lp:~maas-committers/maas/trunk |
Diff against target: |
366 lines (+207/-6) 6 files modified
src/maasserver/tests/test_webapp.py (+5/-2) src/maasserver/webapp.py (+5/-2) src/provisioningserver/rackdservices/image.py (+2/-1) src/provisioningserver/tests/test_plugin.py (+4/-0) src/provisioningserver/utils/tests/test_twisted.py (+124/-1) src/provisioningserver/utils/twisted.py (+67/-0) |
To merge this branch: | bzr merge lp:~allenap/maas/make-web-access-logs-prettier |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mike Pontillo (community) | Approve | ||
Review via email: mp+321495@code.launchpad.net |
Commit message
Make web access log lines prettier and more readable.
Description of the change
Transforms:
2017-03-30 23:01:26 regiond: [info] ::ffff:192.168.1.3 - - [30/Mar/
into:
2017-03-30 23:01:27 regiond: [info] 192.168.1.3 GET /MAAS/rpc/ HTTP/1.0 --> 200 OK (referrer: -; agent: provisioningser
i.e. gets rid of the duplicated timestamp, reorders stuff a bit, and un-IPv6-ifies IPv4 addresses.
To post a comment you must log in.
I'm on the fence about this one. It looks like our previous logging was /almost/ in the "standard" HTTP log format[1], which has some utility: our current-format might make it easy to analyze the logs with any standard HTTP log analyzer. (ok, granted, maybe after a little grep/sed trickery.)
The best part of this change, to me, is the removal of the IPv4-mapped IPv6 address. That alone makes the log so much better already.
Thoughts?
[1]: /en.wikipedia. org/wiki/ Common_ Log_Format
https:/