Logging Issue in Zope 5 with Waitress – Truncation of "CRITICAL" Level

I am currently working with Zope 5, and I have encountered an issue with the logging system when using the Waitress WSGI server. Specifically, the log output shows the log level "CRITICAL" as "CRITICA" due to truncation.

Issue Details:

OS versions:
Windows: Edition:Windows Server 2022/Version:21H2/64-bit
Linux: Ubuntu 20.04.6 LTS / 64-bit

In my zope.ini configuration(i use build-out tool to generate this ini file), I have the following formatter configuration:

[formatter_generic]
format = %(asctime)s %(levelname)-7.7s [%(name)s:%(lineno)s][%(threadName)s] %(message)s

This formatting restricts the levelname to a maximum of 7 characters, which results in truncating the "CRITICAL" log level to "CRITICA".

Solution which worked for me:
To resolve this issue, I modified the format string to:

[formatter_generic]
format = %(asctime)s %(levelname)-8.8s [%(name)s:%(lineno)s][%(threadName)s] %(message)s

This adjustment allows the full "CRITICAL" level to be displayed. However, I am reaching out to confirm whether this is the correct approach and whether there are any recommended best practices or alternative solutions for addressing such logging truncation issues in Zope 5.

  1. Is there a standard solution or recommended configuration to handle log level formatting across various WSGI servers like Waitress?

  2. Should this be raised as a bug or issue for Zope/Waitress, or is it purely a configuration matter?

I would greatly appreciate any insights or guidance from the community regarding this issue.

Does this happen on a default build of Zope 5? Which specific version of Zope 5?