9 Commits

Author SHA1 Message Date
Karl Seguin
a8f5ce12c5 Trying to reduce memory allocation. logQueryArgs is called even when
using the default discardLogger. This allocates quite a bit of memory.
Created a default dlogger instance and avoid logging code when that's our
logger. I couldn't think of a better implementation without touching the
Logger interface.

On 100 000 inserts, this brought the allocation down to 58MB from 122MB.
It should also result in some small performance gains.
2014-11-18 07:53:33 +07:00
Jack Christensen
92cbc6566d Fix log truncation 2014-09-15 14:27:28 -05:00
Jack Christensen
b21a653085 Truncate logged strings and byte slices 2014-09-15 13:53:59 -05:00
Jack Christensen
f5156ac4eb discardLogger should be private 2014-09-04 16:45:35 -05:00
Jack Christensen
717ca04aa7 Remove Crit from pgx.Logger
Nothing pgx should do should generate a Crit / Fatal error (program
must terminate now). The higher level program should make those
decisions.
2014-09-04 16:40:26 -05:00
Jack Christensen
ff905fe862 Finish compatible interface to inconshreveable/log15 2014-09-04 16:27:40 -05:00
Jack Christensen
98109c57bb Use interface for logging instead of log15 directly 2014-09-04 16:00:53 -05:00
Jack Christensen
cbddbb423e Replace logging functionality with log15
gopkg.in/inconshreveable/log15.v2
2014-06-02 19:47:09 -05:00
Jack Christensen
f76489f7d7 Add basic logging to pgx
fixes #21
2013-11-05 15:09:50 -06:00