SEBA-758 send periodic port stats to voltha
SEBA-790 get flow, gemport, and tcont information through API
fix lint errors
Change-Id: I10909e1992eba71d8e54c976ccbcea8778e35539
diff --git a/common/logger/logger.go b/common/logger/logger.go
index 6efe0f1..3701284 100644
--- a/common/logger/logger.go
+++ b/common/logger/logger.go
@@ -31,6 +31,22 @@
func Setup(kafkaBroker string, level string) {
logger := log.New()
+ formatter := &log.TextFormatter{
+ ForceColors: false,
+ DisableColors: false,
+ EnvironmentOverrideColors: false,
+ DisableTimestamp: false,
+ FullTimestamp: true,
+ TimestampFormat: time.RFC3339Nano,
+ DisableSorting: false,
+ SortingFunc: nil,
+ DisableLevelTruncation: false,
+ QuoteEmptyFields: true,
+ FieldMap: nil,
+ CallerPrettyfier: nil,
+ }
+ logger.SetFormatter(formatter)
+
//logger.SetReportCaller(true)
myLogger = logger.WithField("topics", []string{"bbsim.log"})
@@ -121,3 +137,8 @@
func Debug(msg string, args ...interface{}) {
myLogger.Debugf(msg, args...)
}
+
+// Trace logs with log level trace
+func Trace(msg string, args ...interface{}) {
+ myLogger.Tracef(msg, args...)
+}