GroupDocs.Comparison for Python via .NET exposes a small logging API through the groupdocs.comparison.logging namespace. Use it to surface diagnostic messages during development, capture logs in production, or wire the library’s output into your application’s existing logging pipeline.
Console logger
The simplest option is to attach a ConsoleLogger via ComparerSettings when constructing a Comparer. Comparison-time messages are written to standard output:
Recoverable issues (missing fonts substituted, format quirks)
error(message)
Failures that aborted part of the operation
Each method has _file(path, message) and _string(text, message) overloads — the first arg identifies which document caused the log line.
Note
Custom Python subclasses of ILogger are not yet auto-wrapped by the wheel as of 26.4.0.postN — passing a custom logger raises TypeError: cannot wrap … as ILogger. Use ConsoleLogger and redirect stdout/stderr at the OS level for file capture; a future wheel release will add the callback-adapter wiring for ILogger subclasses.
Writing logs to a file
For now, capture ConsoleLogger output to disk by redirecting the process’s stdout / stderr at the OS level:
Rotate the log file with your usual operating-system tooling (logrotate on Linux, scheduled archival on Windows). On Windows PowerShell:
pythonmy_comparison.py*>>groupdocs-comparison.log
Troubleshooting
If a comparison behaves unexpectedly, enable logging first and re-run the example. The logger will surface load-time warnings (missing fonts, unsupported features in a specific format, malformed XML) that the call-site otherwise swallows.
When opening a support ticket on the forum, include the captured log file alongside the source/target documents and a minimal reproducer — the development team can triage faster with the full diagnostic context.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.
On this page
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.