dompdf / dompdf/dompdf

Logger (PSR-3)

Open
#960 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
PHP
Stars
11.2k
Forks
1.8k
PR merge metrics
No merged PRs in 30d

Description

This might be a bit overkill, but if you want to look at the error/warnings/logging stuff in DomPDF, I would like to suggest to take a look at PSR-3: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md

Instead of defining a file, we can attach any PSR-3 logger (file/database based, external services etc).
We could still write a default Logger that just writes to a file or something.

That would get rid of the global $_dompdf_warnings, $_dompdf_show_warnings; variables.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing DomPDF's error, warnings, and logging code, especially the global $_dompdf_warnings and $_dompdf_show_warnings variables mentioned in the issue. Done means the logging design supports an attached PSR-3 logger and defines the proposed default logger behavior, but no files or tests are named.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
observability
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.