def info(self, code, instanceDatum='', supplementaryDatum=''): """Log an info event to the audit trail. DESCRIPTION This method logs an event to the audit trail. ARGUMENTS "code" The code that identifies the event. "instanceDatum" Data about the event. SIDE EFFECTS * Creates an ID for the new event, * Writes the instantiated event to the audit-table, and * Writes the event to the standard Python log. RETURNS None """ d = datetime.now(UTC) eventId = event_id_from_data(self.userInfo, self.userInfo, self.siteInfo, code, instanceDatum, supplementaryDatum) e = self.factory(self.context, eventId, code, d, self.userInfo, None, self.siteInfo, self.groupInfo, instanceDatum, supplementaryDatum, SUBSYSTEM) self.queries.store(e) log.info(e)
def info(self, code, instanceDatum='', supplementaryDatum=''): """Log an info event to the audit trail. DESCRIPTION This method logs an event to the audit trail. ARGUMENTS "code" The code that identifies the event. "instanceDatum" Data about the event. SIDE EFFECTS * Creates an ID for the new event, * Writes the instantiated event to the audit-table, and * Writes the event to the standard Python log. RETURNS None """ d = datetime.now(UTC) eventId = event_id_from_data(self.userInfo, self.userInfo, self.siteInfo, code, instanceDatum, supplementaryDatum) e = self.factory(self.context, eventId, code, d, None, self.userInfo, self.siteInfo, self.groupInfo, instanceDatum, supplementaryDatum, SUBSYSTEM) self.queries.store(e) log.info(e)
def info(self, code, instanceDatum='', supplementaryDatum=''): d = datetime.now(UTC) eventId = event_id_from_data(self.userInfo, self.instanceUserInfo, self.siteInfo, code, instanceDatum, supplementaryDatum) e = self.factory(self.userInfo.user, eventId, code, d, self.userInfo, self.instanceUserInfo, self.siteInfo, None, instanceDatum, supplementaryDatum, SUBSYSTEM) self.queries.store(e) log.info(e)
def info(self, code, instanceDatum=''): d = datetime.now(UTC) eventId = event_id_from_data(self.userInfo, self.userInfo, self.siteInfo, code, instanceDatum, '') e = self.factory(self.site, eventId, code, d, self.userInfo, None, self.siteInfo, None, instanceDatum, None, SUBSYSTEM) self.queries.store(e) log.info(e)
def info(self, code, instanceDatum='', supplementaryDatum=''): d = date.today() eventId = event_id_from_data(self.userInfo, self.instanceUserInfo, self.siteInfo, code, instanceDatum, supplementaryDatum) e = self.factory(self.user, eventId, code, d, self.userInfo, self.instanceUserInfo, self.siteInfo, instanceDatum, supplementaryDatum) self.queries.store(e) log.info(e)
def info(self, code): d = datetime.now(UTC) eventId = event_id_from_data(self.userInfo, self.userInfo, self.siteInfo, code, '', str(d)) e = self.factory(self.context, eventId, code, d, self.userInfo, None, self.siteInfo, None, '', None, SUBSYSTEM) self.queries.store(e) log.info(e)
def info(self, code, instanceDatum='', supplementaryDatum=''): d = datetime.now(UTC) eventId = event_id_from_data(self.adminInfo, self.adminInfo, self.siteInfo, code, instanceDatum, supplementaryDatum) e = self.factory(self.groupInfo.groupObj, eventId, code, d, self.adminInfo, None, self.siteInfo, self.groupInfo, instanceDatum, supplementaryDatum, SUBSYSTEM) self.queries.store(e) log.info(e)
def info(self, code, userInfo='', instanceDatum='', supplementaryDatum=''): d = datetime.now(UTC) i = userInfo and userInfo or self.siteInfo eventId = event_id_from_data(i, i, self.siteInfo, code, instanceDatum, supplementaryDatum) e = self.factory(self.context, eventId, code, d, userInfo, userInfo, self.siteInfo, None, instanceDatum, supplementaryDatum, SUBSYSTEM) self.queries.store(e) log.info(e)
def info(self, code, instanceDatum='', supplementaryDatum=''): d = datetime.now(UTC) iD = to_ascii(instanceDatum) sD = to_ascii(supplementaryDatum) eventId = event_id_from_data(self.userInfo, self.userInfo, self.siteInfo, code, iD, sD) e = self.factory(self.userInfo.user, eventId, code, d, self.userInfo, None, self.siteInfo, None, instanceDatum, supplementaryDatum, SUBSYSTEM) self.queries.store(e) log.info(e)
def info(self, code, instanceUserInfo='', instanceDatum = '', supplementaryDatum = ''): d = datetime.now(UTC) userInfo = createObject('groupserver.LoggedInUser', self.context) instanceUserInfo = instanceUserInfo and instanceUserInfo or userInfo eventId = event_id_from_data(userInfo, instanceUserInfo, self.siteInfo, code, instanceDatum, supplementaryDatum) e = self.factory(self.context, eventId, code, d, userInfo, instanceUserInfo, self.siteInfo, None, instanceDatum, supplementaryDatum, SUBSYSTEM) self.queries.store(e) log.info(e)
def info(self, code, instanceUserInfo='', instanceDatum='', supplementaryDatum=''): d = datetime.now(UTC) userInfo = createObject('groupserver.LoggedInUser', self.context) instanceUserInfo = instanceUserInfo and instanceUserInfo or userInfo eventId = event_id_from_data( userInfo, instanceUserInfo, self.siteInfo, code, instanceDatum, supplementaryDatum) e = self.factory( self.context, eventId, code, d, userInfo, instanceUserInfo, self.siteInfo, None, instanceDatum, supplementaryDatum, SUBSYSTEM) self.queries.store(e) log.info(e)
def info(self, code, instanceDatum='', supplementaryDatum=''): """Log an info event to the audit trail. DESCRIPTION This method logs an event to the audit trail. It is named after the equivalent method in the standard Python logger, which it also writes to. ARGUMENTS "code" The code that identifies the event that is logged. Sometimes this is enough. "instanceDatum" The data to write as the instance datum for the event. Defaults to an empty string. (See below.) "supplementaryDatum" The data to write as the supplementary datum for the event. Defaults to an empty string. (See below.) If the instance datum *and* the supplementary datum are set to empty strings then they are set to the page URL and page title respectively. SIDE EFFECTS * Creates an ID for the new event, * Writes the instantiated event to the audit-table, and * Writes the event to the standard Python log. RETURNS None """ d = datetime.now(UTC) if ((not instanceDatum) and (not supplementaryDatum)): instanceDatum = self.page.absolute_url(0) supplementaryDatum = self.page.title_or_id() eventId = event_id_from_data(self.userInfo, self.userInfo, self.siteInfo, code, instanceDatum, supplementaryDatum) e = self.factory(self.page, eventId, code, d, self.userInfo, None, self.siteInfo, None, instanceDatum, supplementaryDatum, SUBSYSTEM) self.queries.store(e) log.info(e)
def info(self, code, instanceDatum='', supplementaryDatum=''): """Log an info event to the audit trail. DESCRIPTION This method logs an event to the audit trail. It is named after the equivalent method in the standard Python logger, which it also writes to. The three arguments (other than self) are combined to form the arguments to the factory, which creates the event that is then recorded. ARGUMENTS "code" The code that identifies the event that is logged. Sometimes this is enough. "instanceDatum" Data about the event. Each event class has its own way to interpret this data. "supplementaryDatum" More data about an event. SIDE EFFECTS * Creates an ID for the new event, * Writes the instantiated event to the audit-table, and * Writes the event to the standard Python log. RETURNS None """ d = datetime.now(UTC) eventId = event_id_from_data(self.userInfo, self.userInfo, self.siteInfo, code, instanceDatum, supplementaryDatum) e = self.factory(self.userInfo.user, eventId, code, d, self.userInfo, None, self.siteInfo, None, instanceDatum, supplementaryDatum, SUBSYSTEM) self.queries.store(e) log.info(e)