From 717ca04aa7b53860fd65b4ce5ca7e7784eb9486e Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Thu, 4 Sep 2014 16:40:26 -0500 Subject: [PATCH] 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. --- logger.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/logger.go b/logger.go index 773f25c2..461d52fa 100644 --- a/logger.go +++ b/logger.go @@ -10,7 +10,6 @@ type Logger interface { Info(msg string, ctx ...interface{}) Warn(msg string, ctx ...interface{}) Error(msg string, ctx ...interface{}) - Crit(msg string, ctx ...interface{}) } type DiscardLogger struct{} @@ -19,7 +18,6 @@ func (l *DiscardLogger) Debug(msg string, ctx ...interface{}) {} func (l *DiscardLogger) Info(msg string, ctx ...interface{}) {} func (l *DiscardLogger) Warn(msg string, ctx ...interface{}) {} func (l *DiscardLogger) Error(msg string, ctx ...interface{}) {} -func (l *DiscardLogger) Crit(msg string, ctx ...interface{}) {} type connLogger struct { logger Logger @@ -45,8 +43,3 @@ func (l *connLogger) Error(msg string, ctx ...interface{}) { ctx = append(ctx, "pid", l.pid) l.logger.Error(msg, ctx...) } - -func (l *connLogger) Crit(msg string, ctx ...interface{}) { - ctx = append(ctx, "pid", l.pid) - l.logger.Crit(msg, ctx...) -}