odoo/odoo — pull request #2302 by YingLiu4203 (2014-09-10 03:01:42+00:00)
Title: Windows logging bug

**In Windows, Odoo fails to write log messages to a configured logfile**

Impacted versions:
* 7.0 and above

Steps to reproduce:

1. Install Odoo in Windows
2. set `logfile = c:\odoo.log` in openerp-server.conf file
3. Run Odoo in Windows, all log messages are still written to console.

Expected behavior:

1. Log messages should be written to the configure log file.

The reason and the fix:
The reason is that a code error in openrp/netsvc.py.
The 'FileHandler` class is defined
in `logging` module, not in `logging.handlers` module.

The fix is to change the line from
>handler = logging.handlers.FileHandler(logf)

to

> handler = logging.FileHandler(logf)