Table Of Contents

Previous topic

2.1.3.1.3. d1client.DataONEObject

Next topic

2.1.4.1.1. logrecorditerator.LogRecordIterator

This Page

2.1.4. logrecorditerator

2.1.4.1. Module d1_client.logrecorditerator

Implements an iterator that iterates over the entire set of LogRecords for a DataONE node. Data is retrieved from the target only when required.

Created:

2010-07-24

Author:

DataONE (Vieglais)

Dependencies:
  • python 2.6

Example:

import d1_client.client
import sys
logging.basicConfig(level=logging.INFO)
target = "http://dev-dryad-mn.dataone.org/mn"
client = d1_client.client.DataOneClient(target=target)
log_record_iterator = LogRecordIterator(client)
for event in log_record_iterator:
  print "Event    = %s" % event.event
  print "Timestamp  = %s" % event.dateLogged.isoformat()
  print "IP Addres  = %s" % event.ipAddress
  print "Identifier = %s" % event.identifier
  print "User agent = %s" % event.userAgent
  print "Subject  = %s" % event.subject
  print '-' * 79

Classes

LogRecordIterator(client[, fromDate]) Implements an iterator that iterates over the entire set of LogRecords