Skip to content

Commit 2d5850e

Browse files
author
Nick Grippin
authored
Merge pull request cfpb#1116 from jmarin/log-levels
Log levels
2 parents 00c6edd + c98b927 commit 2d5850e

File tree

14 files changed

+77
-2
lines changed

14 files changed

+77
-2
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,9 @@ docker run -d -p "8080:8080 -p 8082:8082" hmda-api
213213
The Filing API will run on `$(docker-machine ip):8080`
214214
The Public API will run on `$(docker-machine ip):8082`
215215

216+
By default, the `HDMA Platform` runs with a log level of `INFO`. This can be changed by establishing a different log level in the `HMDA_LOGLEVEL` environment variable.
217+
For the different logging options, see the [reference.conf](https://github.com/akka/akka/blob/master/akka-actor/src/main/resources/reference.conf#L38) default configuration file for `Akka`.
218+
216219
#### To run the entire platform
217220

218221
1. Ensure you have a Docker Machine with sufficient resources, as described in the [Docker](#docker) section above.

api/src/main/resources/application-dev.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
akka {
22
loggers = ["akka.event.slf4j.Slf4jLogger"]
33
loglevel = "INFO"
4+
loglevel = ${?HMDA_LOGLEVEL}
45
logging-filter = "akka.event.slf4j.Slf4jLoggingFilter"
56
http.parsing.max-content-length = 1G
67
http.server.default-host-header = "cfpb.gov"

api/src/main/resources/application.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
akka {
22
loggers = ["akka.event.slf4j.Slf4jLogger"]
33
loglevel = "INFO"
4+
loglevel = ${?HMDA_LOGLEVEL}
45
logging-filter = "akka.event.slf4j.Slf4jLoggingFilter"
56
http.parsing.max-content-length = 1G
67
http.server.default-host-header = "cfpb.gov"

api/src/main/resources/logback.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@
1818
<logger name="com.zaxxer.hikari" level="INFO" />
1919
<logger name="com.datastax.driver" level="INFO" />
2020
<logger name="org.apache.zookeeper" level="WARN" />
21+
<logger name="de.heikoseeberger.constructr" level="INFO"/>
2122

2223
</configuration>

api/src/main/scala/hmda/api/HmdaPlatform.scala

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,19 @@ object HmdaPlatform {
3333

3434
def main(args: Array[String]): Unit = {
3535

36+
log.info(
37+
"""
38+
| # # # # ###### # ######
39+
| # # ## ## # # # # # # # ## ##### ###### #### ##### # #
40+
| # # # # # # # # # # # # # # # # # # # # # ## ##
41+
| ####### # # # # # # # ###### # # # # ##### # # # # # ## #
42+
| # # # # # # ####### # # ###### # # # # ##### # #
43+
| # # # # # # # # # # # # # # # # # # # #
44+
| # # # # ###### # # # ###### # # # # #### # # # #
45+
|
46+
""".stripMargin
47+
)
48+
3649
val system = ActorSystem(configuration.getString("clustering.name"), configuration)
3750
val cluster = Cluster(system)
3851
ClusterHttpManagement(cluster).start()

panel/src/main/resources/application.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
akka {
22
loglevel = "INFO"
3+
loglevel = ${?HMDA_LOGLEVEL}
34
actor.warn-about-java-serializer-usage = off
45
}
56

persistence-model/src/main/resources/application-dev.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
akka {
22
loglevel = "INFO"
3+
loglevel = ${?HMDA_LOGLEVEL}
34
actor {
45
warn-about-java-serializer-usage = on
56
serializers {

persistence-model/src/main/resources/application.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
akka {
22
loglevel = "INFO"
3+
loglevel = ${?HMDA_LOGLEVEL}
34
actor {
45
warn-about-java-serializer-usage = on
56
serializers {

publication/src/main/resources/application.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
akka {
22
loggers = ["akka.event.slf4j.Slf4jLogger"]
33
loglevel = "INFO"
4+
loglevel = ${?HMDA_LOGLEVEL}
45
logging-filter = "akka.event.slf4j.Slf4jLoggingFilter"
56
http.parsing.max-content-length = 1G
67
http.server.default-host-header = "cfpb.gov"

publication/src/main/resources/logback.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@
1818
<logger name="com.zaxxer.hikari" level="INFO" />
1919
<logger name="com.datastax.driver" level="INFO" />
2020
<logger name="org.apache.zookeeper" level="WARN" />
21+
<logger name="de.heikoseeberger.constructr" level="INFO"/>
2122

2223
</configuration>

0 commit comments

Comments
 (0)