Index: waeup/trunk/src/waeup/utils/batching.txt
===================================================================
--- waeup/trunk/src/waeup/utils/batching.txt	(revision 4885)
+++ waeup/trunk/src/waeup/utils/batching.txt	(revision 4886)
@@ -213,4 +213,14 @@
     ...       setattr(obj, key, value)
 
+If we also want the results being logged, we must provide a logger
+(this is optional):
+
+    >>> import logging
+    >>> logger = logging.getLogger('stoneville')
+    >>> logger.setLevel(logging.DEBUG)
+    >>> logger.propagate = False
+    >>> handler = logging.FileHandler('stoneville.log', 'w')
+    >>> logger.addHandler(handler)
+
 Create the fellows:
 
@@ -218,5 +228,5 @@
     >>> processor.doImport('newcomers.csv', 
     ...                   ['name', 'dinoports', 'owner', 'taxpayer'],
-    ...                    mode='create', user='Bob')
+    ...                    mode='create', user='Bob', logger=logger)
     (4, 0)
 
@@ -248,16 +258,17 @@
 The ``user`` parameter finally is optional and only used for logging.
 
-We can, by the way, see the results of our run in a logfile which is
-named ``newcomers.csv.create.msg``:
-
-    >>> print open('newcomers.csv.create.msg').read()
-    Source: newcomers.csv
-    Mode: create
-    Date: ...
-    User: Bob
-    Failed datasets: newcomers.csv.create.pending
-    Processing time: ... s (... s/item)
-    Processed: 4 lines (4 successful/ 0 failed)
-    <BLANKLINE>
+We can, by the way, see the results of our run in a logfile if we
+provided a logger during the call:
+
+    >>> #print open('newcomers.csv.create.msg').read()
+    >>> print open('stoneville.log').read()
+    --------------------
+    Bob: Batch processing finished: OK
+    Bob: Source: newcomers.csv
+    Bob: Mode: create
+    Bob: User: Bob
+    Bob: Processing time: ... s (... s/item)
+    Bob: Processed: 4 lines (4 successful/ 0 failed)
+    --------------------
 
 As we can see, the processing was successful. Otherwise, all problems
@@ -266,17 +277,22 @@
     >>> processor.doImport('newcomers.csv',
     ...                   ['name', 'dinoports', 'owner', 'taxpayer'],
-    ...                    mode='create', user='Bob')
+    ...                    mode='create', user='Bob', logger=logger)
     (4, 4)
 
 The log file will tell us this in more detail:
 
-    >>> print open('newcomers.csv.create.msg').read()
-    Source: newcomers.csv
-    Mode: create
-    Date: ...
-    User: Bob
-    Failed datasets: newcomers.csv.create.pending
-    Processing time: ... s (... s/item)
-    Processed: 4 lines (0 successful/ 4 failed)
+    >>> #print open('newcomers.csv.create.msg').read()
+    >>> print open('stoneville.log').read()
+    --------------------
+    ...
+    --------------------
+    Bob: Batch processing finished: FAILED
+    Bob: Source: newcomers.csv
+    Bob: Mode: create
+    Bob: User: Bob
+    Bob: Failed datasets: newcomers.csv.create.pending
+    Bob: Processing time: ... s (... s/item)
+    Bob: Processed: 4 lines (0 successful/ 4 failed)
+    --------------------
 
 This time a new file was created, which keeps all the rows we could not
@@ -439,5 +455,3 @@
     >>> os.unlink('newcomers.csv')
     >>> os.unlink('newcomers.csv.create.pending')
-    >>> os.unlink('newcomers.csv.create.msg')
-    >>> os.unlink('newcomers.csv.remove.msg')
-    >>> os.unlink('newcomers.csv.update.msg')
+    >>> os.unlink('stoneville.log')
