Modify

Opened 13 years ago

Last modified 5 years ago

#9801 new defect

No handlers could be found for logger "ho.pisa"

Reported by: Sebuz Owned by:
Priority: normal Component: TracWikiPrintPlugin
Severity: trivial Keywords:
Cc: Trac Release: 0.12

Description

Trac log handler is not passed to Pisa resulting in error messages (Apache error log):

No handlers could be found for logger "ho.pisa"

TracWikiPrintPlugin 1.9.2
pisa 3.0.33
Trac 0.12


Possible fix that worked for me:

Pass the log handler to Pisa before line 260 in wikiprint.py:

 pisa.log.addHandler(self.env._log_handler)
 pdf = pisa.CreatePDF(page, pdf_file, show_errors_as_pdf = True, default_css = css_data, link_callback = loader.getFileName)
 out = pdf_file.getvalue()
 pdf_file.close()
 pisa.log.removeHandler(self.env._log_handler)

Remove handler when done.

Attachments (0)

Change History (2)

comment:1 Changed 13 years ago by Álvaro Iradier

Status: newassigned

Sounds like a good fix, and logging Pisa messages would be useful too. I'll try it and include the proposed patch.

comment:2 Changed 5 years ago by Ryan J Ollos

Owner: Álvaro Iradier deleted
Status: assignednew

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.