Skip to content

Commit

Permalink
Merge pull request #56 from ing-bank/feature/hostname
Browse files Browse the repository at this point in the history
add hostname to logs
  • Loading branch information
arempter committed Oct 28, 2020
2 parents 4ae770f + 6451b76 commit 3af499b
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.ing.wbaa.rokku.sts.util

import java.net.InetAddress
import java.util

import ch.qos.logback.classic.spi.ILoggingEvent
import ch.qos.logback.contrib.json.classic.JsonLayout

Expand Down Expand Up @@ -28,6 +30,7 @@ class MaskingPatternJsonLayout extends JsonLayout {

override def addCustomDataToJsonMap(map: util.Map[String, AnyRef], event: ILoggingEvent): Unit = {
map.put("application_name", "rokku-sts")
map.put("hostname", InetAddress.getLocalHost.getHostName)
super.addCustomDataToJsonMap(map, event)
}
}
Expand Down

0 comments on commit 3af499b

Please sign in to comment.