Closed Bug 748152 Opened 12 years ago Closed 12 years ago

syslog format and ini formats incompatible

Categories

(Socorro :: Backend, task)

x86_64
Linux
task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: lars, Assigned: peterbe)

Details

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: nobody → peterbe
Will change the default format in generic_app.py to instead be with the ${format} instead of the %(format)s
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
landed on master
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.