Sfoglia il codice sorgente

add log when a stream is created

RockyJin 5 anni fa
parent
commit
f39b94d63e
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3 1
      xsql/processors/xsql_processor.go

+ 3 - 1
xsql/processors/xsql_processor.go

@@ -71,7 +71,9 @@ func (p *StreamProcessor) execCreateStream(stmt *xsql.StreamStmt, statement stri
 	if err != nil {
 	if err != nil {
 		return "", fmt.Errorf("Create stream fails: %v.", err)
 		return "", fmt.Errorf("Create stream fails: %v.", err)
 	} else {
 	} else {
-		return fmt.Sprintf("Stream %s is created.", stmt.Name), nil
+		info := fmt.Sprintf("Stream %s is created.", stmt.Name)
+		log.Printf("%s", info)
+		return info, nil
 	}
 	}
 }
 }