Description: disable internal logroate Author: Jonas Genannt Forwarded: not-needed diff --git a/webapp/graphite/logger.py b/webapp/graphite/logger.py index afa43f4..44456ac 100644 --- a/webapp/graphite/logger.py +++ b/webapp/graphite/logger.py @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License.""" import os, logging -from logging.handlers import TimedRotatingFileHandler as Rotater +from logging import FileHandler as LogFileHandler from django.conf import settings logging.addLevelName(30,"rendering") @@ -37,22 +37,22 @@ class GraphiteLogger: self.metricAccessLogger = logging.getLogger("metric_access") #Setup formatter & handlers self.formatter = logging.Formatter("%(asctime)s :: %(message)s","%a %b %d %H:%M:%S %Y") - self.infoHandler = Rotater(self.infoLogFile,when="midnight",backupCount=1) + self.infoHandler = LogFileHandler(self.infoLogFile) self.infoHandler.setFormatter(self.formatter) self.infoLogger.addHandler(self.infoHandler) - self.exceptionHandler = Rotater(self.exceptionLogFile,when="midnight",backupCount=1) + self.exceptionHandler = LogFileHandler(self.exceptionLogFile) self.exceptionHandler.setFormatter(self.formatter) self.exceptionLogger.addHandler(self.exceptionHandler) if settings.LOG_CACHE_PERFORMANCE: - self.cacheHandler = Rotater(self.cacheLogFile,when="midnight",backupCount=1) + self.cacheHandler = LogFileHandler(self.cacheLogFile) self.cacheHandler.setFormatter(self.formatter) self.cacheLogger.addHandler(self.cacheHandler) if settings.LOG_RENDERING_PERFORMANCE: - self.renderingHandler = Rotater(self.renderingLogFile,when="midnight",backupCount=1) + self.renderingHandler = LogFileHandler(self.renderingLogFile) self.renderingHandler.setFormatter(self.formatter) self.renderingLogger.addHandler(self.renderingHandler) if settings.LOG_METRIC_ACCESS: - self.metricAccessHandler = Rotater(self.metricAccessLogFile,when="midnight",backupCount=10) + self.metricAccessHandler = LogFileHandler(self.metricAccessLogFile) self.metricAccessHandler.setFormatter(self.formatter) self.metricAccessLogger.addHandler(self.metricAccessHandler)