Changeset 6624
- Timestamp:
- 25 Aug 2011, 10:10:41 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/utils/logger.py
r6580 r6624 86 86 from waeup.sirp.interfaces import IDataCenter, IDataCenterStorageMovedEvent 87 87 88 #: Default logfile size 88 #: Default logfile size (5 KB) 89 89 MAX_BYTES = 5 * 1024 ** 2 90 90 91 #: Default num of backup files 91 #: Default num of backup files (5) 92 92 BACKUP_COUNT = 5 93 94 #: Default logging level (`logging.INFO') 95 LEVEL = logging.INFO 93 96 94 97 class ILogger(Interface): … … 197 200 handler = logging.handlers.RotatingFileHandler( 198 201 filename, maxBytes=MAX_BYTES, backupCount=BACKUP_COUNT) 202 handler.setLevel(LEVEL) 199 203 formatter = logging.Formatter( 200 204 '%(asctime)s - %(levelname)s - %(message)s') … … 205 209 logger.propagate = False 206 210 logger.addHandler(handler) 211 logger.setLevel(LEVEL) 207 212 return logger 208 213
Note: See TracChangeset for help on using the changeset viewer.