Opened 5 years ago

Closed 5 years ago

#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.

Change History (2)

comment:1 Changed 5 years ago by sebastian

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

comment:2 Changed 5 years ago by sebastian

  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.