func init() {
	logger.SetLogLevel(logger.WARN)
	if logLevel := os.Getenv("VERTICA_SQL_GO_LOG_LEVEL"); logLevel != "" {
		logVal, err := strconv.ParseUint(logLevel, 10, 32)
		if err != nil {
			driverLogger.Error(err.Error())
		} else {
			logFlag := logger.WARN
			switch logVal {
			case 0:
				logFlag = logger.TRACE
			case 1:
				logFlag = logger.DEBUG
			case 2:
				logFlag = logger.INFO
			case 3:
				logFlag = logger.WARN
			case 4:
				logFlag = logger.ERROR
			case 5:
				logFlag = logger.FATAL
			case 6:
				logFlag = logger.NONE
			default:
				driverLogger.Error("invalid VERTICA_SQL_GO_LOG_LEVEL value; should be 0-6")
			}
			logger.SetLogLevel(logFlag)
		}
	}
	if logFile := os.Getenv("VERTICA_SQL_GO_LOG_FILE"); logFile != "" {
		if loggerBackend, err := logger.NewFileLogger(logFile); err == nil {
			logger.SetLogger(loggerBackend)
		} else {
			driverLogger.Error("unable to create file logger: %v", err)
		}
	}
	sql.Register("vertica", &Driver{})
}
Register ourselves with the sql package.
package vertigo
import (
	"database/sql"
	"database/sql/driver"
	"os"
	"strconv"
	"github.com/vertica/vertica-sql-go/logger"
)
type Driver struct{}
const (
	driverName      string = "vertica-sql-go"
	driverVersion   string = "1.2.0"
	protocolVersion uint32 = 0x00030009
)
var driverLogger = logger.New("driver")
func (d *Driver) Open(connString string) (driver.Conn, error) {
	conn, err := newConnection(connString)
	if err != nil {
		driverLogger.Error(err.Error())
	}
	return conn, err
}