PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\var\\log\\testing.log' -> 'C:\\var\\log\\testing.log.1'
[loggers]keys = root, companalysis
[handlers]keys = console, filelog, debugfilelog
[formatters]keys = generic
[logger_root]level = DEBUGhandlers = console, debugfilelog
[logger_companalysis]level = DEBUGhandlers = filelogqualname = companalysis
[handler_console]class = StreamHandlerargs = (sys.stderr,)level = INFOformatter = generic
[handler_filelog]class=handlers.RotatingFileHandlerlevel=DEBUGargs=('/var/log/testing.log','a',1000,100)formatter=generic
[handler_debugfilelog]class=handlers.RotatingFileHandlerlevel=NOTSETargs=('/var/log/toolbox_debugging.log','a',1000,100)formatter=generic
[formatter_generic]format = %(asctime)s %(levelname)-5.5s [%(name)s:%(lineno)s][%(threadName)s] %(message)sHello!I am trying to setup logging. I have run into a bug. If I use RotatingFileHandler and try to start my pyramid setup with pserve --reload development.ini, it throws an error similar to this when it tries to rotate the file:
--
You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discus...@googlegroups.com.
To post to this group, send email to pylons-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/098b16e7-1955-4d21-9f4c-6a32d82fe103%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
This handler is not appropriate for use under Windows, because under Windows open log files cannot be moved or renamed - logging opens the files with exclusive locks - and so there is no need for such a handler. Furthermore, ST_INO is not supported under Windows; stat() always returns zero for this value.
--
So what if I moved the logging stuff into the __init__.py and remove all the logging stuff from development.ini? Would that solve my issue?
To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/7aca6559-568d-4ff6-8aa1-5af39abe9bc2%40googlegroups.com.