Opened on 05/05/2015 at 01:29:29 PM

Closed on 05/05/2015 at 02:59:06 PM

#2456 closed change (fixed)

[cms] Use logging module

Reported by: sebastian Assignee: sebastian
Priority: P3 Milestone:
Module: Sitescripts Keywords:
Cc: Blocked By:
Blocking: #2432 Platform: Unknown
Ready: yes Confidential: no
Tester: Verified working: no
Review URL(s):

http://codereview.adblockplus.org/5076874740891648

Description

Background

Currently the CMS logs warnings to stderr using the print statement. However, for consistency, best practice, and issues with non-ascii log output (in the future) the logging module should be used instead.

What to change

In the CMS, replace code like print >>sys.stder, 'Warning: ..' with logging.warning(..).

However, using the logging module interferes with the logging of werkzeug's development web server. To avoid issues here, the werkzeug logger must be configured explicitly, and must not propagate its messages.

Attachments (0)

Change History (2)

comment:1 Changed on 05/05/2015 at 01:31:31 PM by sebastian

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:2 Changed on 05/05/2015 at 02:59:06 PM by sebastian

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

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from sebastian.
 
Note: See TracTickets for help on using tickets.