=======================
Zope 3/ZServer tracelog
=======================
.. image:: https://github.com/zopefoundation/zc.zservertracelog/actions/workflows/tests.yml/badge.svg
:target: https://github.com/zopefoundation/zc.zservertracelog/actions/workflows/tests.yml
This package implements a Zope2-style (extended) tracelog. A tracelog
is a kind of access log that records several low-level events for each
request. Each log entry starts with a record type, a request
identifier and the time. Some log records have additional data.
To create a trace log, you need to:
- Include the zc.zservertracelog configuration in your site zcml file::
<include package="zc.zservertracelog" />
- Define where messages to the 'zc.tracelog' logger should go. In your
zope.conf file, use something like::
<logger>
name zc.tracelog
propagate false
<logfile>
format %(message)s
path /home/jim/p/zc.zservertracelog/dev/trace.log
</logfile>
</logger>
The analysis script, tracereport, can be used to analyze the trace
log. I recommend the html output option.
Trace log records
=================
- Request begins:
B -1214390740 2007-04-27T20:16:55.582940 GET /
Includes the request method and path.
- Got request input:
I -1214390740 2007-04-27T20:16:55.605791 0
Includes the request content length.
- Entered application thread:
C -1214390740 2007-04-27T20:16:55.703829
- Database activity
D -1223774356 2007-04-27T20:16:55.890371 42 0 x 2 1
The data includes objects loaded and saved for each database except
databases for which there was no activity. Note that it's common
for the main database to be unnamed, and the data often starts with
objects loaded and saved for the main database.
In the example above, 42 objects were loaded from the unnamed
database. Two objects were loaded from and one saved to the database
named 'x'.
If requests are retried due to conflict errors, then there will be
multiple 'D' records.
- Application done:
A -1223774356 2007-04-27T20:16:55.890371 500 84
Includes the response content length.
- Request done:
E -1223774356 2007-04-27T20:16:55.913855
In addition, application startup is logged with an 'S' record:
S 0 2007-04-27T20:24:29.013922
Tracelog extension records are prefixed with a '-':
- -1223774356 2008-09-12T15:51:05.559302 zc.example.extension message
Changes
=======
3.0 (2023-01-23)
----------------
- Drop support for Python 2.7, 3.4, 3.5, 3.6.
- Add support for Python 3.8, 3.9, 3.10, 3.11.
2.0.0 (2019-02-26)
------------------
- Fix logic bug in seconds_difference() that could introduce error up to nearly
a whole second for any particular event.
- Limit number precision in HTML reports to 3 decimal digits.
- Drop Python 2.6 support.
- Add Python 3.4 through 3.7 support.
1.4.0 (2015-05-06)
------------------
- tracereport can be limited to a date range with --date=YYYY-MM-DD..YYYY-MM-DD
1.3.2 (2012-03-20)
------------------
- Slight refactoring to allow alternative tracelog implementations.
1.3.1 (2012-03-20)
------------------
- Fix KeyError: 'ZODB.interfaces.IConnection' on requests that do not have
a ZODB connection in annotations (e.g. GET /++etc++process).
1.3.0 (2010-04-08)
------------------
- Added 'D' records providing database transfer counts.
This is somewhat experimental. The tracereport script ignores D
records.
1.2.1 (2010-01-27)
------------------
- fix reST headings so PyPI page renders properly
- add a warning about the strange logger name
1.2.0 (2009-08-31)
------------------
- tracereport improvements:
- fix parsing bugs.
- add basic tests.
- report time with microsecond resolution.
1.1.5 (2009-04-01)
------------------
- new key for user name in environ (refactoring in zope.app.wsgi)
1.1.4 (2009-03-25)
------------------
- put user names in access log
1.1.3 (2009-03-25)
------------------
- sub-second resolution in timestamps
1.1.1 (2008-11-21)
------------------
- switch back to logger name zc.tracelog to maintain backward compatibility.
1.1.0 (2008-10-31)
------------------
- fixed tracelog extension format so that it doesn't conflict with the Zope2
trace code for server shutdown.
- added *summary-only* and *summary-lines* options to tracereport.
- added shading of alternating rows in tracereport table output.
- fixed a documentation error for loghandler configuration.
0.4 (2008-10-09)
----------------
- added automated tests.
- fixed bug where log entries could be split by messages containing newline
characters.
- added request query strings to log.
- added the tracelog to the WSGI environment.
Raw data
{
"_id": null,
"home_page": "https://github.com/zopefoundation/zc.zservertracelog",
"name": "zc.zservertracelog",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "zope3",
"author": "Zope Corporation and Contributors",
"author_email": "zope3-dev@zope.org",
"download_url": "https://files.pythonhosted.org/packages/b9/f0/a6be099f6db46c31acc551501ef4887dfef0527d9319a996db3dc82e2125/zc.zservertracelog-3.0.tar.gz",
"platform": null,
"description": "=======================\nZope 3/ZServer tracelog\n=======================\n\n.. image:: https://github.com/zopefoundation/zc.zservertracelog/actions/workflows/tests.yml/badge.svg\n :target: https://github.com/zopefoundation/zc.zservertracelog/actions/workflows/tests.yml\n\nThis package implements a Zope2-style (extended) tracelog. A tracelog\nis a kind of access log that records several low-level events for each\nrequest. Each log entry starts with a record type, a request\nidentifier and the time. Some log records have additional data.\n\nTo create a trace log, you need to:\n\n- Include the zc.zservertracelog configuration in your site zcml file::\n\n <include package=\"zc.zservertracelog\" />\n\n- Define where messages to the 'zc.tracelog' logger should go. In your\n zope.conf file, use something like::\n\n <logger>\n name zc.tracelog\n propagate false\n\n <logfile>\n format %(message)s\n path /home/jim/p/zc.zservertracelog/dev/trace.log\n </logfile>\n\n </logger>\n\n\nThe analysis script, tracereport, can be used to analyze the trace\nlog. I recommend the html output option.\n\nTrace log records\n=================\n\n- Request begins:\n\n B -1214390740 2007-04-27T20:16:55.582940 GET /\n\n Includes the request method and path.\n\n- Got request input:\n\n I -1214390740 2007-04-27T20:16:55.605791 0\n\n Includes the request content length.\n\n- Entered application thread:\n\n C -1214390740 2007-04-27T20:16:55.703829\n\n- Database activity\n\n\n D -1223774356 2007-04-27T20:16:55.890371 42 0 x 2 1\n\n The data includes objects loaded and saved for each database except\n databases for which there was no activity. Note that it's common\n for the main database to be unnamed, and the data often starts with\n objects loaded and saved for the main database.\n\n In the example above, 42 objects were loaded from the unnamed\n database. Two objects were loaded from and one saved to the database\n named 'x'.\n\n If requests are retried due to conflict errors, then there will be\n multiple 'D' records.\n\n- Application done:\n\n A -1223774356 2007-04-27T20:16:55.890371 500 84\n\n Includes the response content length.\n\n- Request done:\n\n E -1223774356 2007-04-27T20:16:55.913855\n\nIn addition, application startup is logged with an 'S' record:\n\n S 0 2007-04-27T20:24:29.013922\n\nTracelog extension records are prefixed with a '-':\n\n - -1223774356 2008-09-12T15:51:05.559302 zc.example.extension message\n\n\nChanges\n=======\n\n3.0 (2023-01-23)\n----------------\n\n- Drop support for Python 2.7, 3.4, 3.5, 3.6.\n\n- Add support for Python 3.8, 3.9, 3.10, 3.11.\n\n\n2.0.0 (2019-02-26)\n------------------\n\n- Fix logic bug in seconds_difference() that could introduce error up to nearly\n a whole second for any particular event.\n\n- Limit number precision in HTML reports to 3 decimal digits.\n\n- Drop Python 2.6 support.\n\n- Add Python 3.4 through 3.7 support.\n\n\n1.4.0 (2015-05-06)\n------------------\n\n- tracereport can be limited to a date range with --date=YYYY-MM-DD..YYYY-MM-DD\n\n\n1.3.2 (2012-03-20)\n------------------\n\n- Slight refactoring to allow alternative tracelog implementations.\n\n\n1.3.1 (2012-03-20)\n------------------\n\n- Fix KeyError: 'ZODB.interfaces.IConnection' on requests that do not have\n a ZODB connection in annotations (e.g. GET /++etc++process).\n\n\n1.3.0 (2010-04-08)\n------------------\n\n- Added 'D' records providing database transfer counts.\n This is somewhat experimental. The tracereport script ignores D\n records.\n\n\n1.2.1 (2010-01-27)\n------------------\n\n- fix reST headings so PyPI page renders properly\n- add a warning about the strange logger name\n\n\n1.2.0 (2009-08-31)\n------------------\n\n- tracereport improvements:\n - fix parsing bugs.\n - add basic tests.\n - report time with microsecond resolution.\n\n\n1.1.5 (2009-04-01)\n------------------\n\n- new key for user name in environ (refactoring in zope.app.wsgi)\n\n\n1.1.4 (2009-03-25)\n------------------\n\n- put user names in access log\n\n\n1.1.3 (2009-03-25)\n------------------\n\n- sub-second resolution in timestamps\n\n\n1.1.1 (2008-11-21)\n------------------\n\n- switch back to logger name zc.tracelog to maintain backward compatibility.\n\n\n1.1.0 (2008-10-31)\n------------------\n\n- fixed tracelog extension format so that it doesn't conflict with the Zope2\n trace code for server shutdown.\n\n- added *summary-only* and *summary-lines* options to tracereport.\n\n- added shading of alternating rows in tracereport table output.\n\n- fixed a documentation error for loghandler configuration.\n\n\n0.4 (2008-10-09)\n----------------\n\n- added automated tests.\n\n- fixed bug where log entries could be split by messages containing newline\n characters.\n\n- added request query strings to log.\n\n- added the tracelog to the WSGI environment.\n",
"bugtrack_url": null,
"license": "ZPL 2.1",
"summary": "Zope 3 tracelog implementation for zserver",
"version": "3.0",
"split_keywords": [
"zope3"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "791a96eb2e2021a31400648a21cdf32d68f8d0c70f831b13585914b30a9d93db",
"md5": "7bb54e232c60b3f285c13f85af79d261",
"sha256": "1f76760d20be10ce673f398e94fbbb416801bcf483f9036a0a51d1a60c2af443"
},
"downloads": -1,
"filename": "zc.zservertracelog-3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7bb54e232c60b3f285c13f85af79d261",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 26658,
"upload_time": "2023-01-23T07:13:35",
"upload_time_iso_8601": "2023-01-23T07:13:35.926938Z",
"url": "https://files.pythonhosted.org/packages/79/1a/96eb2e2021a31400648a21cdf32d68f8d0c70f831b13585914b30a9d93db/zc.zservertracelog-3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b9f0a6be099f6db46c31acc551501ef4887dfef0527d9319a996db3dc82e2125",
"md5": "d663b4839c1e3dc3e53f5b0d955a9821",
"sha256": "12e0ec883e086952e102f17e5041beee174415ca8ee91275cd5051e085f47a45"
},
"downloads": -1,
"filename": "zc.zservertracelog-3.0.tar.gz",
"has_sig": false,
"md5_digest": "d663b4839c1e3dc3e53f5b0d955a9821",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 26420,
"upload_time": "2023-01-23T07:13:37",
"upload_time_iso_8601": "2023-01-23T07:13:37.876026Z",
"url": "https://files.pythonhosted.org/packages/b9/f0/a6be099f6db46c31acc551501ef4887dfef0527d9319a996db3dc82e2125/zc.zservertracelog-3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-23 07:13:37",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "zopefoundation",
"github_project": "zc.zservertracelog",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "zc.zservertracelog"
}