diff doc/installation.txt @ 8487:b09ef85f0da6

feat: add nanoid pkg trace_id gen and decorator for setting processName nanoid is a shorter unique id generator and faster than uuid. I truncate nanoid id's to 12 chars to make it more readable. Also added decorator to allow setting the default processName definition in the logging module. admin.py and wsgi_handler now set processName. configuration.py knows how to overide the processName if set to the default MainProcess. Updated install docs to add nanoid as optional, how to switch to different trace_id output. pydoc generated docs include logcontext module and are referenced from admin.py.
author John Rouillard <rouilj@ieee.org>
date Mon, 08 Dec 2025 00:23:14 -0500
parents 1522e0e15903
children 7142740e6547
line wrap: on
line diff
--- a/doc/installation.txt	Sat Nov 15 16:59:24 2025 -0500
+++ b/doc/installation.txt	Mon Dec 08 00:23:14 2025 -0500
@@ -253,7 +253,11 @@
   version 2.0 of gpg from test.pypi.org. See the `gpg install
   directions in the upgrading document`_.
 
-
+nanoid
+  If nanoid_ is installed, it is used to generate short unique
+  ids to link all logging to a single request. If not installed,
+  uuid4's from the standard library are used.
+  
 jinja2
   To use the jinja2 template (may still be experimental, check out
   its TEMPLATE-INFO.txt file) you need
@@ -2432,6 +2436,7 @@
 .. _mod_python: https://github.com/grisha/mod_python
 .. _mod_wsgi: https://pypi.org/project/mod-wsgi/
 .. _MySQLdb: https://pypi.org/project/mysqlclient/
+.. _nanoid: https://pypi.org/project/nanoid/
 .. _Olson tz database: https://www.iana.org/time-zones
 .. _polib: https://polib.readthedocs.io
 .. _Psycopg2: https://www.psycopg.org/

Roundup Issue Tracker: http://roundup-tracker.org/