more log4go additions
This commit is contained in:
parent
b89c69d86b
commit
d746c2529a
2 changed files with 5 additions and 5 deletions
|
|
@ -1,10 +1,10 @@
|
|||
package connector
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/ezoic/go-kinesis"
|
||||
l4g "github.com/ezoic/sol/log4go"
|
||||
)
|
||||
|
||||
// CreateStream creates a new Kinesis stream (uses existing stream if exists) and
|
||||
|
|
@ -14,7 +14,7 @@ func CreateStream(k *kinesis.Kinesis, streamName string, shardCount int) {
|
|||
err := k.CreateStream(streamName, shardCount)
|
||||
|
||||
if err != nil {
|
||||
fmt.Printf("CreateStream ERROR: %v\n", err)
|
||||
l4g.Error("CreateStream ERROR: %v", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
@ -27,7 +27,7 @@ func CreateStream(k *kinesis.Kinesis, streamName string, shardCount int) {
|
|||
args.Add("StreamName", streamName)
|
||||
resp, _ = k.DescribeStream(args)
|
||||
streamStatus := resp.StreamDescription.StreamStatus
|
||||
fmt.Printf("Stream [%v] is %v\n", streamName, streamStatus)
|
||||
l4g.Info("Stream [%v] is %v", streamName, streamStatus)
|
||||
|
||||
if streamStatus != "ACTIVE" {
|
||||
time.Sleep(4 * time.Second)
|
||||
|
|
@ -43,7 +43,7 @@ func StreamExists(k *kinesis.Kinesis, streamName string) bool {
|
|||
args := kinesis.NewArgs()
|
||||
resp, err := k.ListStreams(args)
|
||||
if err != nil {
|
||||
fmt.Printf("ListStream ERROR: %v\n", err)
|
||||
l4g.Error("ListStream ERROR: %v", err)
|
||||
return false
|
||||
}
|
||||
for _, s := range resp.StreamNames {
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ func (e RedshiftManifestEmitter) writeManifestToS3(files []string, manifestFileN
|
|||
content := e.generateManifestFile(files)
|
||||
err := bucket.Put(manifestFileName, content, "text/plain", s3.Private, s3.Options{})
|
||||
if err != nil {
|
||||
fmt.Printf("Error occured while uploding to S3: %v\n", err)
|
||||
l4g.Error("Error occured while uploding to S3: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue