Hi Dave,<br><br>I forgot to provide the information about the code how I am using logger<br>Here is the complete scenario<br><br>I have modified the code as mentioned in reply and is working fine. But still I am facing an issue and the issue is described below.<br>
<br>In configuration file i have coded the TimedRotatingFileHandler like<br>args=("G:\\lok_sib\\logs\\rotate_test", 'D', 1)<br><br>Code:<br>mlogger = logging.getLogger("simpleExample")<br>def a_view(request):<br>
    mlogger.debug("a_view called")   <br>    if request.method== "POST" :<br>        mlogger.debug("post function")<br>    else:<br>        mlogger.debug("serve function")<br><br>Execution:<br>
step1: Executed the code and got the log file with the information<br>step2: Modified the system time from current day to next day<br>step3: End up with the error and the error is pasted below<br><br>Traceback (most recent call last):<br>
  File "c:\Python25\lib\logging\handlers.py", line 74, in emit<br>    self.doRollover()<br>  File "c:\Python25\lib\logging\handlers.py", line 274, in doRollover<br>    os.rename(self.baseFilename, dfn)<br>
WindowsError: [Error 32] The process cannot access the file because it is being used by another process<br><br>Python version - 2.5.4<br><br>I guess my output should be like this for the next day<br>-a new log file rotate_test.<date format> should generate in the respective location<br>
<br>Please correct me if I am wrong.<br><br><br>Thanks for your time.<br><br>Regards,<br>Lokesh<br>