Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
Source hostname from InetAddress as the HOSTNAME env var is not alway…
Browse files Browse the repository at this point in the history
…s set (#185)
  • Loading branch information
fieldju authored Jan 25, 2019
1 parent 5da3959 commit c7270d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/resources/logback.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ logger("ACCESS_LOG", accessLogLevel, allAsyncAccessLogAppendersArray, false)

// Auditable Events
if (ConfigService.getInstance().isAuditLoggingEnabled()) {
def hostname = System.getenv('HOSTNAME')
def hostname = System.getenv('HOSTNAME') ? System.getenv('HOSTNAME') : InetAddress.getLocalHost().getHostName()
appender("audit-log-appender", FiveMinuteRollingFileAppender) {
file = "${LOG_FILE_DIRECTORY_PATH}/${hostname}-audit.log"

Expand Down

0 comments on commit c7270d7

Please sign in to comment.