fission function logs returns logs in correct order now (#405)
Fix a bug in `fission function logs` due to which logs with the same timestamp were printed in the wrong order.
This commit is contained in:
committed by
Soam Vasani
parent
04531850d5
commit
2247d3118a
+10
-4
@@ -444,6 +444,11 @@ func fnLogs(c *cli.Context) error {
|
||||
Namespace: metav1.NamespaceDefault,
|
||||
}
|
||||
|
||||
recordLimit := c.Int("recordcount")
|
||||
if recordLimit <= 0 {
|
||||
recordLimit = 1000
|
||||
}
|
||||
|
||||
f, err := client.FunctionGet(m)
|
||||
checkErr(err, "get function")
|
||||
|
||||
@@ -463,10 +468,11 @@ func fnLogs(c *cli.Context) error {
|
||||
select {
|
||||
case <-requestChan:
|
||||
logFilter := logdb.LogFilter{
|
||||
Pod: fnPod,
|
||||
Function: f.Metadata.Name,
|
||||
FuncUid: string(f.Metadata.UID),
|
||||
Since: t,
|
||||
Pod: fnPod,
|
||||
Function: f.Metadata.Name,
|
||||
FuncUid: string(f.Metadata.UID),
|
||||
Since: t,
|
||||
RecordLimit: recordLimit,
|
||||
}
|
||||
logEntries, err := logDB.GetLogs(logFilter)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user