Opened 3 years ago

Closed 3 years ago

#5083 defect closed fixed (fixed)

Logging docs contain wrong import

Reported by: hynek Owned by:
Priority: normal Milestone:
Component: core Keywords: documentation easy
Cc: oubiwann, thijs, ivank-twisted-bugs@… Branch:
Author: Launchpad Bug:

Description

The example on http://twistedmatrix.com/documents/current/core/howto/logging.html for DailyLogFile has an invalid import:

from twisted.python.logging import DailyLogFile

It should be:

from twisted.python.logfile import DailyLogFile

Attachments (1)

5083-00-fix-logging-import.patch (571 bytes) - added by ivank 3 years ago.
fix

Download all attachments as: .zip

Change History (6)

comment:1 Changed 3 years ago by DefaultCC Plugin

  • Cc oubiwann added

Changed 3 years ago by ivank

fix

comment:2 Changed 3 years ago by ivank

  • Cc ivank-twisted-bugs@… added
  • Component changed from website to core
  • Keywords documentation easy review added

comment:3 follow-up: Changed 3 years ago by jerub

  • Keywords review removed

I appreciate the quick turnaround on this. I am willing to commit this patch to trunk if a news file is correctly create. This is a doc fix so if you could amend the patch to contain 5083.doc with a brief statement about what was fixed, that would be best.

I've tested the new code to make sure it's okay, it doesn't do an explicit import of 'log' but considering the context that it is in, I don't think it's important for it to do so.

Please throw in a non-empty news file with a .doc extension, and I will commit your change.

comment:4 in reply to: ↑ 3 Changed 3 years ago by thijs

  • Cc thijs added

Replying to jerub:

Please throw in a non-empty news file with a .doc extension, and I will commit your change.

I think this can be merged with an empty .misc file, because it's not major enough (like a new addition to the docs) to be mentioned in the changelog.

comment:5 Changed 3 years ago by exarkun

  • Resolution set to fixed
  • Status changed from new to closed

(In [31776]) Apply logging howto example fix to import DailyLogFile from the right module

Author: ivank
Reviewer: jerub, thijs, exarkun
Fixes: #5083

Change an incorrect import to a correct import in the logging howto.

Note: See TracTickets for help on using tickets.