Skip to content

Commit 91defee

Browse files
committed
SCFF-20 Modifications in order to anyone can run the project
1 parent ec8696d commit 91defee

9 files changed

Lines changed: 23 additions & 19 deletions

File tree

caching/caching_boltdb.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package caching
33
import (
44
"fmt"
55
"github.com/boltdb/bolt"
6-
"github.com/cloudfoundry-community/firehose-to-syslog/logging"
6+
"bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/logging"
77
cfClient "github.com/cloudfoundry-community/go-cfclient"
88
json "github.com/mailru/easyjson"
99
"log"

caching/cachingfakes/fake_caching.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"sync"
66
"time"
77

8-
"github.com/cloudfoundry-community/firehose-to-syslog/caching"
8+
"bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/caching"
99
)
1010

1111
type FakeCaching struct {

eventRouting/eventRouting_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package eventRouting_test
22

33
import (
4-
. "github.com/cloudfoundry-community/firehose-to-syslog/caching/cachingfakes"
4+
. "bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/caching/cachingfakes"
55
. "github.com/cloudfoundry-community/firehose-to-syslog/eventRouting"
66
. "github.com/cloudfoundry-community/firehose-to-syslog/logging/loggingfakes"
77
. "github.com/cloudfoundry/sonde-go/events"

eventRouting/eventrouting.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ package eventRouting
33
import (
44
"fmt"
55
"github.com/Sirupsen/logrus"
6-
"github.com/cloudfoundry-community/firehose-to-syslog/caching"
7-
fevents "github.com/cloudfoundry-community/firehose-to-syslog/events"
8-
"github.com/cloudfoundry-community/firehose-to-syslog/extrafields"
9-
"github.com/cloudfoundry-community/firehose-to-syslog/logging"
6+
"bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/caching"
7+
fevents "bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/events"
8+
"bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/extrafields"
9+
"bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/logging"
1010
"github.com/cloudfoundry/sonde-go/events"
1111
"os"
1212
"sort"

events/events.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package events
33
import (
44
"fmt"
55
"github.com/Sirupsen/logrus"
6-
"github.com/cloudfoundry-community/firehose-to-syslog/caching"
7-
"github.com/cloudfoundry-community/firehose-to-syslog/utils"
6+
"bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/caching"
7+
"bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/utils"
88
"github.com/cloudfoundry/sonde-go/events"
99
)
1010

events/events_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package events_test
22

33
import (
4-
. "github.com/cloudfoundry-community/firehose-to-syslog/caching"
5-
. "github.com/cloudfoundry-community/firehose-to-syslog/caching/cachingfakes"
4+
. "bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/caching"
5+
. "bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/caching/cachingfakes"
66
fevents "github.com/cloudfoundry-community/firehose-to-syslog/events"
77
. "github.com/cloudfoundry/sonde-go/events"
88
. "github.com/onsi/ginkgo"

firehoseclient/firehoseclient.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ package firehoseclient
22

33
import (
44
"crypto/tls"
5-
"github.com/cloudfoundry-community/firehose-to-syslog/eventRouting"
6-
"github.com/cloudfoundry-community/firehose-to-syslog/logging"
5+
"bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/eventRouting"
6+
"bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/logging"
77
"github.com/cloudfoundry-community/go-cfclient"
88
"github.com/cloudfoundry/noaa/consumer"
99
"github.com/cloudfoundry/sonde-go/events"

logging/logging_logrus.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ type LoggingLogrus struct {
1818
}
1919

2020
func NewLogging(SyslogServerFlag string, SysLogProtocolFlag string, LogFormatterFlag string, DebugFlag bool) Logging {
21+
2122
return &LoggingLogrus{
2223
Logger: logrus.New(),
2324
syslogServer: SyslogServerFlag,
@@ -37,9 +38,10 @@ func (l *LoggingLogrus) Connect() bool {
3738
} else {
3839
l.Logger.Out = os.Stdout
3940
}
40-
41+
//fmt.Println("using [%s] as l.syslogServer", l.syslogServer)
4142
if l.syslogServer != "" {
4243
hook, err := logrus_syslog.NewSyslogHook(l.syslogProtocol, l.syslogServer, syslog.LOG_INFO, "doppler")
44+
//fmt.Println("error [%s] as l.syslogServer", err)
4345
if err != nil {
4446
LogError(fmt.Sprintf("Unable to connect to syslog server [%s]!\n", l.syslogServer), err.Error())
4547
} else {

main.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import (
44
"fmt"
55
"log"
66
"os"
7-
"github.com/cloudfoundry-community/firehose-to-syslog/caching"
8-
"github.com/cloudfoundry-community/firehose-to-syslog/eventRouting"
9-
"github.com/cloudfoundry-community/firehose-to-syslog/firehoseclient"
10-
"github.com/cloudfoundry-community/firehose-to-syslog/logging"
7+
"bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/caching"
8+
"bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/eventRouting"
9+
"bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/firehoseclient"
10+
"bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/logging"
1111
"github.com/cloudfoundry-community/go-cfclient"
1212
"github.com/pkg/profile"
1313
"gopkg.in/alecthomas/kingpin.v2"
@@ -124,7 +124,9 @@ func main() {
124124
IdleTimeoutSeconds: *keepAlive,
125125
FirehoseSubscriptionID: *subscriptionId,
126126
}
127-
127+
logging.LogStd(fmt.Sprintf("connect logging '%s'",loggingClient.Connect()), true)
128+
logging.LogStd(fmt.Sprintf("using '%s' as syslogServer", syslogServer), true)
129+
logging.LogStd(fmt.Sprintf("using '%s' as syslogServer", *debug), true)
128130
if loggingClient.Connect() || *debug {
129131

130132
logging.LogStd("Connected to Syslog Server! Connecting to Firehose...", true)

0 commit comments

Comments
 (0)