Project

Profile

Help

Issue #3879

Updated by bmbouter over 5 years ago

h2. Issue 

 The pointed issue is that if I want to configure pure console logging (for container environments) I cannot. The syslog handler gets configured and attempts to connect failing. If I try to set my logging configuration like the following, the syslog handler I explicitly try to exclude is added: 

 <pre> 
 logging: 
   formatters: 
     simple: 
       format: "pulp: %(name)s:%(levelname)s: %(message)s" 
   handlers: 
     console: 
       class: logging.StreamHandler 
       formatter: simple 
   loggers: 
     '': 
       handlers: ["console"] 
       level: INFO 
 </pre> 

 I have had to hack around this for now via -- https://github.com/ehelms/pulp/commit/8e82d27a6294c2db139ce2ffc41002cc70309777 

 How can This raises two issues for Pulp 3 to consider and I only use my settings and was not "merge" with the defaults. 

 h2. Solution 

 Update the behavior sure if I should split or include all in one ticket. 

  1) I should be able to configure console only logging. Perhaps this should be the default logging? With syslog as an 'overwrite' from exercise for the top level of each. user? 
  2) The settings merge could would only replace user values for default values for the keys: DATABASES, logging, ..., PROFILING 

 https://github.com/pulp/pulp/blob/12919c2040b3de1a061e647f1f59e7494294d600/pulpcore/pulpcore/app/settings.py#L219-L240 code can add in attributes I may explicitly not want included or are potentially unknowingly included leading to unexpected behavior.

Back