Skip to content

Logging in problemplastex seems to silently get swallowed #403

@Matistjati

Description

@Matistjati

AFAIK, the at least warnings in problemtools/ProblemPlasTeX/__init__.py gets completely swallowed. It uses plastex's logger

from plasTeX.Logging import getLogger

log = getLogger()

which prints nothing to my console for either log.error or log.warning, even with -l debug.

If I naively switch to

import logging
log = logging.getLogger(__name__)

then the output looks bad

[problemtools.ProblemPlasTeX] ERROR: Failed to convert .pdf image
   /home/matistjati/po/swedish-
   olympiad-2026/lager2/fredrikspizzeria/problem_statement/sample1.pdf to
   .png.

So I'm putting this off for now (we probably need a minor refactor with how logging works, and nobody probably cares that much for this part of the code anyway). This likely affects more than just this file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions