Don't log error creating database on connect (#2740)

closes #2739
This commit is contained in:
Daniel Nelson 2017-04-28 15:58:46 -07:00 committed by Daniel Nelson
parent 20ab8fb2c3
commit 499495f844
No known key found for this signature in database
GPG Key ID: CAAD59C9444F6155
1 changed files with 3 additions and 1 deletions

View File

@ -132,7 +132,9 @@ func (i *InfluxDB) Connect() error {
err = c.Query("CREATE DATABASE " + i.Database)
if err != nil {
log.Println("E! Database creation failed: " + err.Error())
if !strings.Contains(err.Error(), "Status Code [403]") {
log.Println("I! Database creation failed: " + err.Error())
}
continue
}
}