use zap for logging (#1112)

Use zap for logging
This commit is contained in:
Jon Carl
2019-03-14 21:11:15 +05:30
committed by Vishal
parent c717f182b6
commit 0fc864f230
98 changed files with 2031 additions and 1223 deletions
+1 -1
View File
@@ -19,7 +19,6 @@ package logdb
import (
"encoding/json"
"fmt"
"log"
"net/http"
"net/url"
"sort"
@@ -30,6 +29,7 @@ import (
influxdbClient "github.com/influxdata/influxdb/client/v2"
"github.com/fission/fission"
"github.com/fission/fission/fission/log"
)
const (
+2 -4
View File
@@ -17,9 +17,8 @@ limitations under the License.
package logdb
import (
"fmt"
"time"
log "github.com/sirupsen/logrus"
)
const (
@@ -55,6 +54,5 @@ func GetLogDB(dbType string, serverURL string) (LogDatabase, error) {
case INFLUXDB:
return NewInfluxDB(serverURL)
}
log.Fatalf("Log database type is incorrect, now only support %s", INFLUXDB)
return nil, nil
return nil, fmt.Errorf("log database type is incorrect, now only support %s", INFLUXDB)
}