anchor.diff:                                      opts.logfileName <- Some(fileName)
                                       opts.logfile<- Some(new StreamWriter(fileName))
   
  +          member x.Take() = take()
  +          member x.Release(z) = release z
             member x.Opts with get() = opts
  -          member x.Log(msg:string) =
  -            match opts.logfile with
  -                | None -> ()
  -                | Some(f) -> lock opts.logfile ( fun _ -> f.Write(System.DateTime.Now.ToString("yyyyddMM HH:mm:ss.FFF")); f.Write("\t") ; f.WriteLine(msg) ; f.Flush())
  -          
  +          member x.Log(msg:string) = log msg
             member x.LogConnUse with get() = opts.logConnUse and set(v) = opts.logConnUse <- v  
             member x.LogQueries with get() = opts.logQueries and set(v) = opts.logQueries <- v  
             member x.LogLongerThan with get() = opts.logLongerThan  and set(v) = opts.logLongerThan <- v  
  
positive.code:             //use command =  connection.CreateCommand()
              //use command = new DynamicSqlCommand(sql,fun () -> pool.Release(connection))
              //command.CommandText <- sql 
              if x.LogQueries then x.Log(sql)
  
              use command : DynamicSqlCommand = x.Command sql
              /// Determine details of this record's constructor
              let cons = typeof<'T>.UnderlyingSystemType.GetConstructors() |> Array.filter (fun c -> c.IsConstructor) |> Seq.head
              let argMap = cons.GetParameters() |> Array.mapi (fun i v -> (v.Name.ToLower(),i)) |> Map.ofSeq
              let args = Array.init (cons.GetParameters().Length) (fun _ -> Object())
              seq {
                  use reader = command.ExecuteReader()
                  let fieldMap = [for i in 0..reader.Reader.FieldCount-1 -> 
                                      match argMap.TryFind (reader.Reader.GetName(i).ToLower()) with
  
negative.code:       let logQuery s =if opts.logQueries then log s
          
        member private x.Command = cmd
        member x.GetConnHash() = cmd.Connection.GetHashCode()
        // Adds parameter with the specified name and value
        static member (?<-) (cmd:DynamicSqlCommand, name:string, value) = 
          let p = NpgsqlParameter("@" + name, box value)
          cmd.Command.Parameters.Add(p) |> ignore
        // Execute command and wrap returned SqlDataReader
        member x.ExecuteReader() =  
                      let start = System.DateTime.Now
                      let r = cmd.ExecuteReader()
                      if opts.logQueries || ((System.DateTime.Now - start).TotalMilliseconds > opts.logLongerThan) then
                          sprintf "%d\t%f\t%s" (x.Command.Connection.GetHashCode()) ((System.DateTime.Now-start).TotalMilliseconds) x.Command.CommandText |> log
                      new DynamicSqlDataReader(r)
  
        member x.ExecuteNonQuery() = 
                      let start = System.DateTime.Now
                      let r = cmd.ExecuteNonQuery()
                      if opts.logQueries || ((System.DateTime.Now - start).TotalMilliseconds > opts.logLongerThan) then
                          sprintf "%d\t%f\t%s" (x.Command.Connection.GetHashCode()) ((System.DateTime.Now-start).TotalMilliseconds) x.Command.CommandText |> log
                      r
        
        member x.ExecuteScalar() = 
                      let start = System.DateTime.Now
                      let r = cmd.ExecuteScalar()
                      if opts.logQueries || ((System.DateTime.Now - start).TotalMilliseconds > opts.logLongerThan) then
                          sprintf "%d\t%f\t%s" (x.Command.Connection.GetHashCode()) ((System.DateTime.Now-start).TotalMilliseconds) x.Command.CommandText |> log
                      r
        member x.Parameters = cmd.Parameters
        member x.Close() = cmd.Connection.Close()
        interface IDisposable with
  