Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yangl900 committed Mar 18, 2018
1 parent b9f7171 commit 13a6983
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions log2oms.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ func logLines(client *logclient.LogClient, lines []string) {

func metadata() map[string]string {
metadata := make(map[string]string)
metadata["Hostname"], _ = os.Hostname()

for _, e := range os.Environ() {
pair := strings.Split(e, "=")

Expand Down Expand Up @@ -67,8 +69,6 @@ func main() {
}

metadata := metadata()
metadata["Hostname"], _ = os.Hostname()

for m := range metadata {
fmt.Printf("[LOG2OMS][%s] %s = %s\n", time.Now().UTC().Format(time.RFC3339), m, metadata[m])
}
Expand Down

0 comments on commit 13a6983

Please sign in to comment.