Opened 5 years ago

Closed 3 years ago

#6569 defect closed fixed (fixed)

twisted.python.log.DefaultObserver does its own weird thing, doesn't use textFromEventDict

Reported by: Glyph Owned by: Wilfredo Sánchez Vega
Priority: normal Milestone:
Component: core Keywords:
Cc: Branch: branches/log-default-observer-6569
branch-diff, diff-cov, branch-cov, buildbot
Author: wsanchez


Among other things, this means that DefaultObserver does not safely repr its argument. So, logging stuff like log.msg("Hello", BrokenRepr(), isError=1) will result in an exception and DefaultLogObserver being removed, whereas FileLogObserver will handle it correctly.

Change History (6)

comment:1 Changed 5 years ago by Wilfredo Sánchez Vega

Status: newassigned

Accepting, holding for #6750, which should either fix this or make it cleaner to fix.

comment:2 Changed 3 years ago by Wilfredo Sánchez Vega

Author: wsanchez
Branch: branches/log-default-observer-6569

(In [44467]) Branch for #6569.

comment:3 Changed 3 years ago by Wilfredo Sánchez Vega

Keywords: review added
Owner: Wilfredo Sánchez Vega deleted
Status: assignednew

comment:4 Changed 3 years ago by ralphm

Owner: set to ralphm
Status: newassigned

comment:5 Changed 3 years ago by ralphm

Keywords: review removed
Owner: changed from ralphm to Wilfredo Sánchez Vega
Status: assignednew

Yay for removing duplicate code. Please merge.

comment:6 Changed 3 years ago by Wilfredo Sánchez Vega

Resolution: fixed
Status: newclosed

(In [44476]) Merge branches/log-default-observer-6569: Don't raise if DefaultObserver.emit() gets a hostile message.

Author: wsanchez Reviewer: ralphm Fixes: #6569

Note: See TracTickets for help on using tickets.