geopython/pycsw — pull request #93 by ingenieroariel (2012-10-29 22:07:30+00:00)
Title: simplify logging strategy

This pull request deals with getting rid of the Logging object without reintroducing the repeated log output. It follows the convention recommended in the official docs to set up a logger for each module:

http://docs.python.org/2/library/logging.html#logger-objects
```
LOGGER = logging.getLogger(__name__)
```

The reason this changes are needed is because when using pycsw as a library on another Django project, logging setup is already taken care of and pycsw's setup was conflicting with it.

The main reason this approach succeeds is because of the use of logging.basicConfig instead of setLevel, setFormat, setHandler, other approaches tried bring back an ever increasing amount of log output.

Tested only with csw.wsgi.

Caveats: The logic for when to enable the CGI debugging changed a bit, it needs to be double checked by someone using that functionality.