Function logs: Uses proper way to get server URL
After changes related to port forwarding, function logs was getting empty URL, fixed to use the appropriate method instead.
This commit is contained in:
+2
-2
@@ -599,7 +599,7 @@ func fnLogs(c *cli.Context) error {
|
||||
checkErr(err, "get function")
|
||||
|
||||
// request the controller to establish a proxy server to the database.
|
||||
logDB, err := logdb.GetLogDB(dbType, c.GlobalString("server"))
|
||||
logDB, err := logdb.GetLogDB(dbType, getServerUrl())
|
||||
if err != nil {
|
||||
fatal("failed to connect log database")
|
||||
}
|
||||
@@ -671,7 +671,7 @@ func fnPods(c *cli.Context) error {
|
||||
|
||||
// client first sends db query to the controller, then the controller
|
||||
// will establish a proxy server that bridges the client and the database.
|
||||
logDB, err := logdb.GetLogDB(dbType, c.GlobalString("server"))
|
||||
logDB, err := logdb.GetLogDB(dbType, getServerUrl())
|
||||
if err != nil {
|
||||
fatal("failed to connect log database")
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ func (influx InfluxDB) GetLogs(filter LogFilter) ([]LogEntry, error) {
|
||||
logEntries := []LogEntry{}
|
||||
response, err := influx.query(query)
|
||||
if err != nil {
|
||||
return logEntries, nil
|
||||
return logEntries, err
|
||||
}
|
||||
for _, r := range response.Results {
|
||||
for _, series := range r.Series {
|
||||
|
||||
Reference in New Issue
Block a user