Re: how to avoid hardcoding of logfile path in logging.conf file

2009-01-28 Thread Vinay Sajip
On Jan 28, 11:07 am, Rama Vadakattu wrote: > Thanks bruno desthuilliers > the tip which you have given is working. > I think it's better just to have the logging configuration done at the bottom of settings.py (either programmatically or via fileConfig). Typically, if

Re: how to avoid hardcoding of logfile path in logging.conf file

2009-01-28 Thread Rama Vadakattu
Thanks bruno desthuilliers the tip which you have given is working. One more tweak which i have done is instead of LOG_PATH = "/whatever/you/want.log" in setting.py i have used LOG_PATH = "\"/whatever/you/want.log\"" otherwise it is throwing out some exception. Thanks Eric for your code.

Re: how to avoid hardcoding of logfile path in logging.conf file

2009-01-27 Thread Eric Abrahamsen
On Jan 27, 2009, at 9:45 PM, Rama Vadakattu wrote: > > Eric, > can you please show me the code snippet of specifying a logfile in > settings.py. Sure, here's something I use to keep a separate log of requests to an RSS feed: settings.py ### LOG_FILE = '/path/to/log/file.log' feeds.py

Re: how to avoid hardcoding of logfile path in logging.conf file

2009-01-27 Thread bruno desthuilliers
On 27 jan, 11:31, Rama wrote: > please look at the below logging.conf file.http://dpaste.com/hold/113443/ > > For RotatingFileHandler [handler_rfileHandler]  i have hard coded the log > file path as "/home/rama/djangoprojects/doloto/logs/logs.txt" > how to avoid such

Re: how to avoid hardcoding of logfile path in logging.conf file

2009-01-27 Thread Rama Vadakattu
Eric, can you please show me the code snippet of specifying a logfile in settings.py. On Jan 27, 6:37 pm, Eric Abrahamsen wrote: > On Jan 27, 2009, at 9:28 PM, Thomas Guettler wrote: > > > > > Rama schrieb: > >> please look at the below logging.conf file. > >> ... > >> can any

Re: how to avoid hardcoding of logfile path in logging.conf file

2009-01-27 Thread Eric Abrahamsen
On Jan 27, 2009, at 9:28 PM, Thomas Guettler wrote: > > Rama schrieb: >> please look at the below logging.conf file. >> ... >> can any one guide me on how to avoid hardcoding of log file path ? >> >> > Hi, > > I am not a logging expert, maybe there is a solution, but if you > do your setup

Re: how to avoid hardcoding of logfile path in logging.conf file

2009-01-27 Thread Thomas Guettler
Rama schrieb: > please look at the below logging.conf file. > ... > can any one guide me on how to avoid hardcoding of log file path ? > > Hi, I am not a logging expert, maybe there is a solution, but if you do your setup with python code, you can use e.g. os.environ['HOME'] or settings.FOO.

how to avoid hardcoding of logfile path in logging.conf file

2009-01-27 Thread Rama
please look at the below logging.conf file. http://dpaste.com/hold/113443/ For RotatingFileHandler [handler_rfileHandler] i have hard coded the log file path as "/home/rama/djangoprojects/doloto/logs/logs.txt" how to avoid such hard coding of log file path in the logging.conf file. 1) i have