Menu

#9 Question about a patch

Unstable (example)
open
nobody
None
5
2015-10-31
2015-10-27
Marc Joliet
No

Hi,

I have a question about a patch to dblatex that somebody else wrote for Gentoo. I wish to finally get dblatex included in the main portage tree (see https://github.com/gentoo/gentoo/pull/291), but need to clarify this patch first (and if it's OK, get you to include it ;-) ).

(Note that I've never used the logging module myself, so I might have missed something while trying to understand this.)

So here's how I understand it:

Basically, the patch makes sure that the root logger gets a default configuration by calling logging.basicConfig() from scripts/dblatex, before anything else imports logging. It also changes package_base to match the installation layout, but I don't think that's significant here because as far as I can tell the base argument to dblatex.main() doesn't affect the logger.

I think that the only places it changes anything are:

  • modules imported by dblatex that use logging without configuring it themselves (library code?), and
  • the "pdfscan.xref" logger, which isn't included in log_groups in PDFScannerCommand._option_group_loglevels() (in tools/pdfscan.py) and thus remains unconfigured.

What do you think?

1 Attachments

Discussion

  • Guillon

    Guillon - 2015-10-31

    I don't see where there is no logging setup in dblatex. I'm interested to know what has driven the patch. What's wrong without it?

    Maybe there's an issue with the pdfscan logging setup, but it is not related to dblatex (no code shared), so the patch in the dblatex script is irrelevant to fix pdfscan.

     
    • Marc Joliet

      Marc Joliet - 2015-10-31

      It looks like we're in agreement then.

      With regards to what drove this patch, well, I don't know. It was originally written for a Gentoo overlay (package repository) that is now offline, so there is no log to read. I didn't want to originally, but I contacted the owner of said overlay to be on the safe side.

      But can you say if the first point (imported modules) is relevant? If not, then I would conclude that this patch is useless and can be dropped.

       

      Last edit: Marc Joliet 2015-10-31
    • Marc Joliet

      Marc Joliet - 2015-10-31

      Well, I already got a reply: he doesn't remember what the patch was supposed to fix.

       

Log in to post a comment.