Skip to content

Commit

Permalink
Added description to health status
Browse files Browse the repository at this point in the history
  • Loading branch information
hohonuuli committed Dec 14, 2021
1 parent 567188f commit 1e65f55
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 68 deletions.
28 changes: 0 additions & 28 deletions src/main/resources/logback.xml

This file was deleted.

1 change: 1 addition & 0 deletions src/main/scala/org/mbari/vars/vam/AppConfig.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ object AppConfig {

val Version: String = Try(getClass.getPackage.getImplementationVersion).getOrElse("0.0.0")

val Description: String = "Video Asset Manager"
}
3 changes: 2 additions & 1 deletion src/main/scala/org/mbari/vars/vam/model/HealthStatus.scala
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ final case class HealthStatus(
maxMemory: Long,
totalMemory: Long,
application: String = AppConfig.Name,
version: String = AppConfig.Version
version: String = AppConfig.Version,
description: String = AppConfig.Description
)

object HealthStatus {
Expand Down
32 changes: 13 additions & 19 deletions src/pack/conf/logback.xml
Original file line number Diff line number Diff line change
@@ -1,29 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Logging Configuration.
-->
<configuration scan="true">
<configuration scan="false" debug="false">

<statusListener class="ch.qos.logback.core.status.NopStatusListener" />
<statusListener class="ch.qos.logback.core.status.NopStatusListener" />

<variable name="LOGBACK_LEVEL" value="${LOGBACK_LEVEL:-DEBUG}" />
<variable name="LOGBACK_LEVEL" value="${LOGBACK_LEVEL:-INFO}" />

<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>debug</level>
</filter>
<withJansi>true</withJansi>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<!-- <pattern>%d{yyyy-MM-dd HH:mm:ss} [%t] %p %c - %m%n</pattern> -->
<!-- <pattern>%gray(%d{yyyy-MM-dd HH:mm:ss}) %highlight(%p) [%green(%t)] %blue(%c) | %m%n</pattern> -->
<pattern>%gray(%d{HH:mm:ss.SSS}) %highlight(%-5level) [%green(%-25thread)] %blue(%-40logger{40}) %gray(|) %msg%n</pattern>
</encoder>
</appender>
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%gray(%d{HH:mm:ss.SSS}) %highlight(%-5level) [%green(%-25thread)] %blue(%-40logger{40}) %gray(|) %msg%n</pattern>
</encoder>
</appender>

<logger name="org.eclipse.jetty" level="WARN" />
<logger name="org.eclipse.jetty" level="WARN" />

<root level="${LOGBACK_LEVEL}">
<appender-ref ref="CONSOLE" />
</root>
<root level="${LOGBACK_LEVEL}">
<appender-ref ref="CONSOLE" />
</root>

</configuration>
36 changes: 16 additions & 20 deletions src/test/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -1,29 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Logging Configuration.
-->
<configuration scan="true">
<configuration scan="false" debug="false">

<statusListener class="ch.qos.logback.core.status.NopStatusListener" />
<!-- <statusListener class="ch.qos.logback.core.status.NopStatusListener" /> -->

<variable name="LOGBACK_LEVEL" value="${LOGBACK_LEVEL:-WARN}" />
<variable name="LOGBACK_LEVEL" value="${LOGBACK_LEVEL:-DEBUG}" />

<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>debug</level>
</filter>
<withJansi>true</withJansi>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<!-- <pattern>%d{yyyy-MM-dd HH:mm:ss} [%t] %p %c - %m%n</pattern> -->
<pattern>%gray(%d{yyyy-MM-dd HH:mm:ss}) %highlight(%p) [%green(%t)] %blue(%c) | %m%n</pattern>
</encoder>
</appender>
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%gray(%d{HH:mm:ss.SSS}) %highlight(%-5level) [%green(%-25thread)] %blue(%-40logger{40}) %gray(|) %msg%n</pattern>
</encoder>
</appender>

<logger name="org.apache.http" level="WARN" />
<logger name="org.eclipse.jetty" level="WARN" />

<root level="${LOGBACK_LEVEL}">
<appender-ref ref="CONSOLE" />
</root>
<logger name="org.apache.http" level="WARN" />
<logger name="org.eclipse.jetty" level="WARN" />

</configuration>
<root level="${LOGBACK_LEVEL}">
<appender-ref ref="CONSOLE" />
</root>

</configuration>

0 comments on commit 1e65f55

Please sign in to comment.