Eric V. Smith added the comment:
It looks like you need to use double-backslashes everywhere in your path, or
use single backslashes and raw strings (r).
--
nosy: +eric.smith
resolution: - invalid
status: open - closed
___
Python tracker
Simon Naish added the comment:
I am using double backslashes in my path.
But logger\config.py is losing them, please re-read the issue description,
logger\config.py is part of the python libraries!
--
___
Python tracker rep...@bugs.python.org
Eric V. Smith added the comment:
Apologies for reading too quickly. I've reopened this.
--
resolution: invalid -
status: closed - open
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19528
New submission from Simon Naish:
When attempting to use a config file with logging to set up a series of loggers
in a script, when running on windows, if the config file name starts with an
'r' then the script fails with the following error:-
File C:\Users\simon\Documents\python
Eric V. Smith added the comment:
Can you provide a small, stand-alone program that demonstrates the problem? In
particular, I want to see how this filename is provided to logging.
--
___
Python tracker rep...@bugs.python.org
Simon Naish added the comment:
Example proggie.
It writes its own config file (really_cool_logging.conf), then attempts to read
it, all to ~/testlog
If you inherit from the class FileLogger with any other class you get instant
access to self.log.any logger command which will write debug and
Simon Naish added the comment:
Updated TestFileLogger, missed a line out in my rush to get you something,
sorry!
--
Added file: http://bugs.python.org/file32545/TestFileLogger.py
___
Python tracker rep...@bugs.python.org
Simon Naish added the comment:
And again. Damn!
--
Added file: http://bugs.python.org/file32546/TestFileLogger.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19528
___
Changes by Eric V. Smith e...@trueblade.com:
--
resolution: invalid -
status: closed - open
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19528
___
Peter Otten added the comment:
Simon, in your code you build the config file with
'''...
args=('{0}', 'a', 131072, 10)
...
'''.format(filename)
The logging module uses eval() to process the args tuple, and a filename
containing a bashlash will not roundtrip that way. Have a look at the .conf
Simon Naish added the comment:
Hi Peter,
Oh well spotted!
Fair enough, but that is seriously not obvious, thanks.
Si
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19528
___
Eric V. Smith added the comment:
Thanks, Peter.
--
resolution: - invalid
stage: - committed/rejected
status: open - closed
type: - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19528
12 matches
Mail list logo