I use logging settings as below in the settings.py file:
logging.basicConfig(level=LOG_LEVEL, format=LOG_FORMAT);
handler = logging.handlers.RotatingFileHandler( LOG_FILE_PATH, 'a', LOG_FILE_SIZE,LOG_FILE_NUM );
formatter = logging.Formatter ( LOG_FORMAT );
handler.setFormatter(formatter);
logging.getLogger().addHandler(handler)
and i use mod_python with apache2.
the problem is: when the log rotate, i got many log files created at the same time. for example, i set 5 work-process in apache, and i got log.1, log.2 ... log.5 when it rotate.
any suggestions?