Changeset 8742 for main/waeup.kofa/trunk/src/waeup/kofa/applicants
- Timestamp:
- 18 Jun 2012, 06:28:41 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/applicants
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/applicant.py
r8667 r8742 67 67 return 68 68 69 def loggerInfo(self, ob_class, comment=None): 70 target = self.applicant_id 71 return grok.getSite()['applicants'].logger_info(ob_class,target,comment) 69 def writeLogMessage(self, view, message): 70 ob_class = view.__implemented__.__name__.replace('waeup.kofa.','') 71 self.__parent__.__parent__.logger.info( 72 '%s - %s - %s' % (ob_class, self.applicant_id, message)) 73 return 72 74 73 75 @property -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py
r8684 r8742 578 578 else: 579 579 ob_class = self.__implemented__.__name__.replace('waeup.kofa.','') 580 self.context.__parent__.logger _info(581 ob_class,result.applicant_id,msg)580 self.context.__parent__.logger.info( 581 '%s - %s - %s' % (ob_class, result.applicant_id, msg)) 582 582 if len(created): 583 583 self.flash(_('${a} students successfully created.', … … 653 653 success, msg, log = self.context.approveApplicantPayment() 654 654 if log is not None: 655 ob_class = self.__implemented__.__name__.replace('waeup.kofa.','') 656 self.context.__parent__.loggerInfo(ob_class, log) 655 self.context.__parent__.writeLogMessage(self, log) 657 656 self.flash(msg) 658 657 return … … 824 823 self.wf_info.fireTransition(trans_id) 825 824 self.flash(_('Form has been saved.')) 826 ob_class = self.__implemented__.__name__.replace('waeup.kofa.','')827 825 if fields_string: 828 self.context. loggerInfo(ob_class, 'saved: % s' % fields_string)826 self.context.writeLogMessage(self, 'saved: % s' % fields_string) 829 827 return 830 828 … … 856 854 self.flash(_('Successfully removed: ${a}', 857 855 mapping = {'a':', '.join(deleted)})) 858 ob_class = self.__implemented__.__name__.replace('waeup.kofa.','') 859 self.context.loggerInfo( 860 ob_class, 'removed: % s' % ', '.join(deleted)) 856 self.context.writeLogMessage( 857 self, 'removed: % s' % ', '.join(deleted)) 861 858 return 862 859 -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py
r8613 r8742 438 438 """ 439 439 440 def loggerInfo(ob_class, comment):440 def writeLogMessage(view, comment): 441 441 """Adds an INFO message to the log file 442 442 """ -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/root.py
r8412 r8742 42 42 logger_name = 'waeup.kofa.${sitename}.applicants' 43 43 logger_filename = 'applicants.log' 44 45 def logger_info(self, target, ob_class, comment=None):46 """Get the logger's info method.47 """48 self.logger.info('%s - %s - %s' % (49 target, ob_class, comment))50 return51 44 52 45 ApplicantsRoot = attrs_to_fields(ApplicantsRoot)
Note: See TracChangeset for help on using the changeset viewer.