diff --git a/constants.go b/constants.go index e072515..7d697cc 100644 --- a/constants.go +++ b/constants.go @@ -25,9 +25,6 @@ const ( envKey = "env" hostnameKey = "hostname" localIpKey = "localIP" - realmKey = "realm" - regionKey = "region" - azKey = "az" domainKey = "domain" goosKey = "os" goArchKey = "arch" diff --git a/event_factory.go b/event_factory.go index 033045f..0b61aec 100644 --- a/event_factory.go +++ b/event_factory.go @@ -25,9 +25,6 @@ const ( ) var ( - realm = "" - region = "" - az = "" domain = "" localIp = getLocalIP() hostname = getHostName() @@ -153,9 +150,6 @@ func NewEventFactory(option ...EventOption) *EventFactory { options: option, } - realm = getDefaultIfEmptyString(os.Getenv("REALM"), "*") - region = getDefaultIfEmptyString(os.Getenv("REGION"), "*") - az = getDefaultIfEmptyString(os.Getenv("AZ"), "*") domain = getDefaultIfEmptyString(os.Getenv("DOMAIN"), "*") return factory diff --git a/event_zap.go b/event_zap.go index 9d8d922..adb38ca 100644 --- a/event_zap.go +++ b/event_zap.go @@ -689,9 +689,6 @@ func (event *eventZap) envToMapObjectEncoder() *zapcore.MapObjectEncoder { enc := zapcore.NewMapObjectEncoder() enc.AddString(hostnameKey, hostname) enc.AddString(localIpKey, localIp) - enc.AddString(realmKey, realm) - enc.AddString(regionKey, region) - enc.AddString(azKey, az) enc.AddString(domainKey, domain) enc.AddString(goosKey, goos) enc.AddString(goArchKey, goArch) diff --git a/example/example.go b/example/example.go index a8aee47..1d69a98 100644 --- a/example/example.go +++ b/example/example.go @@ -43,8 +43,8 @@ var ( ) func main() { - withEventFlattenEncoding() - //withEventConsoleEncoding() + //withEventFlattenEncoding() + withEventConsoleEncoding() //withEventJSONEncoding() //withEventHelper() }