Skip to content
This repository was archived by the owner on Aug 8, 2024. It is now read-only.

Commit c7de175

Browse files
author
Rory McCann
committed
Update documation to reflect what's actually returned
1 parent 506695e commit c7de175

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Example
2121
>>> import apache_log_parser
2222
>>> line_parser = apache_log_parser.make_parser("%h <<%P>> %t %Dus \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %l %u")
2323
>>> log_line_data = line_parser('127.0.0.1 <<6113>> [16/Aug/2013:15:45:34 +0000] 1966093us "GET / HTTP/1.1" 200 3478 "https://example.com/" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18)" - -')
24+
>>> from pprint import pprint
2425
>>> pprint(log_line_data)
2526
{'pid': '6113',
2627
'remote_host': '127.0.0.1',
@@ -29,11 +30,25 @@ Example
2930
'request_first_line': 'GET / HTTP/1.1',
3031
'request_header_referer': 'https://example.com/',
3132
'request_header_user_agent': 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18)',
33+
'request_header_user_agent__browser__family': 'Other',
34+
'request_header_user_agent__browser__version_string': '',
35+
'request_header_user_agent__is_mobile': False,
36+
'request_header_user_agent__os__family': 'Linux',
37+
'request_header_user_agent__os__version_string': '',
38+
'request_http_ver': '1.1',
39+
'request_method': 'GET',
40+
'request_url': '/',
3241
'response_bytes_clf': '3478',
3342
'status': '200',
3443
'time_received': '[16/Aug/2013:15:45:34 +0000]',
44+
'time_received_datetimeobj': datetime.datetime(2013, 8, 16, 15, 45, 34),
45+
'time_received_isoformat': '2013-08-16T15:45:34',
46+
'time_received_tz_datetimeobj': datetime.datetime(2013, 8, 16, 15, 45, 34, tzinfo='0000'),
47+
'time_received_tz_isoformat': '2013-08-16T15:45:34+00:00',
48+
'time_received_utc_datetimeobj': datetime.datetime(2013, 8, 16, 15, 45, 34, tzinfo='0000'),
49+
'time_received_utc_isoformat': '2013-08-16T15:45:34+00:00',
3550
'time_us': '1966093'}
36-
51+
3752
The version numbers follow [Semantic Versioning](http://semver.org/).
3853

3954
Copyright

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy