Skip to content

Commit

Permalink
[enhance] mongo: also print log when batch insert
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederic Ye committed Jun 8, 2012
1 parent af6c538 commit 3a1ec75
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions stdlib/apis/mongo/mongo.opa
Expand Up @@ -611,6 +611,10 @@ MongoDriver = {{
**/
insert_batch(m:Mongo.db, flags:int, ns:string, documents:list(Bson.document)): bool =
mbuf = create_(m.bufsize)
do if m.log then
(str, len) = export_(mbuf)
s = String.substring(0,len,str)
ML.debug("MongoDriver.send(insert_batch)","\n{string_of_message(s)}",void)
do insert_batch_(mbuf,flags,ns,documents)
snd(m,mbuf,"insert")
Expand Down

0 comments on commit 3a1ec75

Please sign in to comment.