Fixing structured logging conflicts.

parent eb9ff34f
......@@ -91,7 +91,7 @@ func (s *RedisSupplier) RoleDelete(ctx context.Context, roleId string, hints ...
key := buildRedisKeyForRoleName(role.Name)
if err := s.client.Del(key).Err(); err != nil {
l4g.Error("Redis failed to remove key " + key + " Error: " + err.Error())
mlog.Error("Redis failed to remove key " + key + " Error: " + err.Error())
}
}
......
......@@ -504,7 +504,7 @@ func (ss *SqlSupplier) CreateColumnIfNotExistsNoDefault(tableName string, column
if ss.DriverName() == model.DATABASE_DRIVER_POSTGRES {
_, err := ss.GetMaster().ExecNoTimeout("ALTER TABLE " + tableName + " ADD " + columnName + " " + postgresColType)
if err != nil {
l4g.Critical(utils.T("store.sql.create_column.critical"), err)
mlog.Critical(fmt.Sprintf("Failed to create column %v", err))
time.Sleep(time.Second)
os.Exit(EXIT_CREATE_COLUMN_POSTGRES)
}
......@@ -514,7 +514,7 @@ func (ss *SqlSupplier) CreateColumnIfNotExistsNoDefault(tableName string, column
} else if ss.DriverName() == model.DATABASE_DRIVER_MYSQL {
_, err := ss.GetMaster().ExecNoTimeout("ALTER TABLE " + tableName + " ADD " + columnName + " " + mySqlColType)
if err != nil {
l4g.Critical(utils.T("store.sql.create_column.critical"), err)
mlog.Critical(fmt.Sprintf("Failed to create column %v", err))
time.Sleep(time.Second)
os.Exit(EXIT_CREATE_COLUMN_MYSQL)
}
......@@ -522,7 +522,7 @@ func (ss *SqlSupplier) CreateColumnIfNotExistsNoDefault(tableName string, column
return true
} else {
l4g.Critical(utils.T("store.sql.create_column_missing_driver.critical"))
mlog.Critical("Failed to create column because of missing driver")
time.Sleep(time.Second)
os.Exit(EXIT_CREATE_COLUMN_MISSING)
return false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment