Clean up logging bugs.

boulder-ca was redundantly calling SetAuditLogger, leading to a warning message.

NewDbMap was calling GetAuditLogger, which is an anti-pattern, but didn't really
need to log anyhow. So deleted those lines. This cleans up some of the spam that
shows up when a test fails.
This commit is contained in:
Jacob Hoffman-Andrews 2016-03-26 19:32:32 -07:00
parent 4daf747a40
commit 91c95abd19
2 changed files with 0 additions and 8 deletions

View File

@ -111,8 +111,6 @@ func main() {
// AUDIT[ Error Conditions ] 9cc4d537-8534-4970-8665-4b382abe82f3
defer auditlogger.AuditPanic()
blog.SetAuditLogger(auditlogger)
go cmd.DebugServer(c.CA.DebugAddr)
var paDbMap *gorp.DbMap

View File

@ -50,10 +50,6 @@ var sqlOpen = func(dbType, connectStr string) (*sql.DB, error) {
func NewDbMapFromConfig(config *mysql.Config) (*gorp.DbMap, error) {
adjustMySQLConfig(config)
logger := blog.GetAuditLogger()
logger.Debug("Connecting to database")
db, err := sqlOpen("mysql", config.FormatDSN())
if err != nil {
return nil, err
@ -67,8 +63,6 @@ func NewDbMapFromConfig(config *mysql.Config) (*gorp.DbMap, error) {
initTables(dbmap)
logger.Debug("Connected to database")
return dbmap, err
}