Return endpoint's IP address instead of ClusterIP
[ric-plt/appmgr.git] / cmd / appmgr / logger.go
index b8a7475..d1bcf15 100755 (executable)
@@ -20,9 +20,9 @@
 package main
 
 import (
+       mdclog "gerrit.o-ran-sc.org/r/com/golog"
        "net/http"
        "time"
-       mdclog "gerrit.o-ran-sc.org/r/com/golog"
 )
 
 type Log struct {
@@ -45,22 +45,22 @@ func (l *Log) SetMdc(key string, value string) {
 }
 
 func (l *Log) Error(pattern string, args ...interface{}) {
-       l.SetMdc("time", time.Now().Format("2019-01-02 15:04:05"))
+       l.SetMdc("time", time.Now().Format(time.RFC3339))
        l.logger.Error(pattern, args...)
 }
 
 func (l *Log) Warn(pattern string, args ...interface{}) {
-       l.SetMdc("time", time.Now().Format("2019-01-02 15:04:05"))
+       l.SetMdc("time", time.Now().Format(time.RFC3339))
        l.logger.Warning(pattern, args...)
 }
 
 func (l *Log) Info(pattern string, args ...interface{}) {
-       l.SetMdc("time", time.Now().Format("2019-01-02 15:04:05"))
+       l.SetMdc("time", time.Now().Format(time.RFC3339))
        l.logger.Info(pattern, args...)
 }
 
 func (l *Log) Debug(pattern string, args ...interface{}) {
-       l.SetMdc("time", time.Now().Format("2019-01-02 15:04:05"))
+       l.SetMdc("time", time.Now().Format(time.RFC3339))
        l.logger.Debug(pattern, args...)
 }