syslog format and ini formats incompatible

RESOLVED FIXED

Status

RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: lars, Assigned: peterbe)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

7 years ago
the new App class automatically sets up logging using logging's pythonic substitution syntax '%(key_name)s'.  ConfigObj and ConfigParser use the exactly same format for subsitutions within ini files.  If either sees the substitution format with a option, they try to do a doomed substitution.

the solution is to make a new substitution format for use in the ini file that neither ConfigObj nor ConfigParser will recognize.  Before passing the values to the logging facility, however, we'll must convert the values back to the normal format that logging understands.  

I propose the we just replace the "%" with "$" in the logging format lines.  Then we substitute the correct "%" character at the last minute.
(Assignee)

Updated

7 years ago
Assignee: nobody → peterbe
(Assignee)

Comment 1

7 years ago
Will change the default format in generic_app.py to instead be with the ${format} instead of the %(format)s

Comment 3

7 years ago
Commit pushed to master at https://github.com/mozilla/socorro

https://github.com/mozilla/socorro/commit/0d01d404a141b19185dca4d7c92d7e50a6a17836
bug748152 - syslog formatting to use an auxiliary format, r=lars
(Assignee)

Comment 4

7 years ago
landed on master
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.