Fix logging errors when failing to write to a path.

Review Request #7161 — Created April 2, 2015 and submitted

Information

Djblets
release-0.8.x
36a5477...

Reviewers

If logging is enabled, but the destination path is not writable, we fall
back to a basic logging configuration. This configuration, however,
doesn't support the parameters we put into the log format string.

We now use our own log formatter unconditionally, and just set up a
StreamHandler if we can't write anywhere.

I hit this when testing against a database with a log path pointing to
a non-existent location. It ended up giving those strange "request_info"
errors we occasionally see. After this change, I had a reasonable console
log.

Unit tests pass.

reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        djblets/log/__init__.py
    
    
    
    Tool: Pyflakes
    Processed Files:
        djblets/log/__init__.py
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-0.8.x (08688ba)
Loading...