Skip to content

Commit

Permalink
Using hostname as an env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
ishita9 committed Oct 11, 2024
1 parent 1dad022 commit 6459837
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions webapp/metviewer/WEB-INF/classes/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout
pattern="%style{%d{ISO8601}}{black} %highlight{%-5level }[%style{%L}{blue}] [%style{%M}{bright,blue}] %style{%C{1.}}{bright,yellow} %style{METviewer}{bright,green} %style{[%X{hostName}]}{bright,red} %msg%n%throwable%n" />
pattern="%style{%d{ISO8601}}{black} %highlight{%-5level }[%style{%L}{blue}] [%style{%M}{bright,blue}] %style{%C{1.}}{bright,yellow} %style{METviewer}{bright,green} %style{[${env:HOSTNAME:-None}]}{bright,red} %msg%n%throwable%n" />
</Console>

<File name="RollingFile" fileName="/opt/vxwww/tomcat/logs/mvservlet.log" append="true">
<PatternLayout
pattern="%style{%d{ISO8601}}{black} %highlight{%-5level }[%style{%L}{blue}] [%style{%M}{bright,blue}] %style{%C{1.}}{bright,yellow} %style{METviewer}{bright,green} %style{[%X{hostName}]}{bright,red} %msg%n%throwable%n" />
pattern="%style{%d{ISO8601}}{black} %highlight{%-5level }[%style{%L}{blue}] [%style{%M}{bright,blue}] %style{%C{1.}}{bright,yellow} %style{METviewer}{bright,green} %style{[${env:HOSTNAME:-None}]}{bright,red} %msg%n%throwable%n" />
</File>
</Appenders>

Expand All @@ -18,4 +18,4 @@
<AppenderRef ref="RollingFile"/>
</Root>
</Loggers>
</Configuration>
</Configuration>
4 changes: 2 additions & 2 deletions webapp/metviewer/WEB-INF/classes/log4j2.xml.orig
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout
pattern="%style{%d{ISO8601}}{black} %highlight{%-5level }[%style{%L}{blue}] [%style{%M}{bright,blue}] %style{%C{1.}}{bright,yellow} %style{METviewer}{bright,green} %style{[%X{hostName}]}{bright,red} %msg%n%throwable%n" />
pattern="%style{%d{ISO8601}}{black} %highlight{%-5level }[%style{%L}{blue}] [%style{%M}{bright,blue}] %style{%C{1.}}{bright,yellow} %style{METviewer}{bright,green} %style{[${env:HOSTNAME:-None}]}{bright,red} %msg%n%throwable%n" />
</Console>

<File name="RollingFile" fileName="/opt/vxwww/tomcat/logs/mvservlet.log" append="true">
<PatternLayout
pattern="%style{%d{ISO8601}}{black} %highlight{%-5level }[%style{%L}{blue}] [%style{%M}{bright,blue}] %style{%C{1.}}{bright,yellow} %style{METviewer}{bright,green} %style{[%X{hostName}]}{bright,red} %msg%n%throwable%n" />
pattern="%style{%d{ISO8601}}{black} %highlight{%-5level }[%style{%L}{blue}] [%style{%M}{bright,blue}] %style{%C{1.}}{bright,yellow} %style{METviewer}{bright,green} %style{[${env:HOSTNAME:-None}]}{bright,red} %msg%n%throwable%n" />
</File>
</Appenders>

Expand Down

0 comments on commit 6459837

Please sign in to comment.