Changeset 9769 for main/waeup.kofa/trunk/src/waeup
- Timestamp:
- 5 Dec 2012, 08:32:11 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/datacenter.py
r9589 r9769 116 116 """Get the files from logs/ subdir. Files are sorted by name. 117 117 118 By default backup logs ('app.log.1', etc.) are excluded. 118 By default backup logs ('app.log.1', etc.) and payments.log 119 are excluded. 119 120 """ 120 121 result = [] … … 124 125 for name in sorted(os.listdir(logdir)): 125 126 if not os.path.isfile(os.path.join(logdir, name)): 127 continue 128 if name == 'payments.log': 126 129 continue 127 130 if exclude_backups == True and RE_LOGFILE_BACKUP_NAME.match(name): -
main/waeup.kofa/trunk/src/waeup/kofa/payments/payment.py
r9505 r9769 31 31 payment_states) 32 32 from waeup.kofa.utils.helpers import attrs_to_fields, get_current_principal 33 from waeup.kofa.utils.logger import Logger 33 34 34 class Payment(grok.Container ):35 class Payment(grok.Container, Logger): 35 36 """This is a payment. 36 37 """ … … 38 39 grok.provides(IPayment) 39 40 grok.baseclass() 41 42 logger_name = 'waeup.kofa.${sitename}.payments' 43 logger_filename = 'payments.log' 44 logger_format_str = '"%(asctime)s","%(user)s",%(message)s' 45 46 def logger_info(self, comment=None): 47 """Get the logger's info method. 48 """ 49 self.logger.info('%s' % comment) 50 return 40 51 41 52 def __init__(self): -
main/waeup.kofa/trunk/src/waeup/kofa/utils/logger.py
r8608 r9769 157 157 #: replaced by the actual used site name. 158 158 logger_name = 'waeup.kofa.${sitename}' 159 160 #: The format to use when logging. 161 logger_format_str = '%(asctime)s - %(levelname)s - %(user)s - %(message)s' 162 159 163 implements(ILogger) 160 164 … … 214 218 filename, when='MON', backupCount=BACKUP_COUNT) 215 219 handler.setLevel(LEVEL) 216 formatter = logging.Formatter( 217 '%(asctime)s - %(levelname)s - %(user)s - %(message)s') 220 formatter = logging.Formatter(self.logger_format_str) 218 221 handler.setFormatter(formatter) 219 222
Note: See TracChangeset for help on using the changeset viewer.