Skip to content

Commit

Permalink
DPP-403 log flyway progress (#9964)
Browse files Browse the repository at this point in the history
* Log migration progress on kvutils participants

changelog_begin
changelog_end

* Log flyway progress in daml-on-sql

* Revert "Log flyway progress in daml-on-sql"

This reverts commit 7809b8c.

* Log flyway progress on daml-on-sql

... using a duplicated file
  • Loading branch information
rautenrieth-da authored Jun 15, 2021
1 parent 401069e commit adeba20
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ledger/daml-on-sql/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ da_scala_library(
da_scala_binary(
name = "daml-on-sql-binary",
main_class = "com.daml.on.sql.Main",
resources = ["//ledger/sandbox-common:src/main/resources/logback.xml"],
resources = ["src/main/resources/logback.xml"],
deps = [
":daml-on-sql",
],
Expand All @@ -71,7 +71,7 @@ da_scala_binary(
da_scala_binary(
name = "daml-on-sql-ephemeral-postgresql",
main_class = "com.daml.on.sql.MainWithEphemeralPostgresql",
resources = ["//ledger/sandbox-common:src/main/resources/logback.xml"],
resources = ["src/main/resources/logback.xml"],
deps = [
":daml-on-sql",
":daml-on-sql-test-lib",
Expand Down
44 changes: 44 additions & 0 deletions ledger/daml-on-sql/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg %replace(, context: %marker){', context: $', ''} %n</pattern>
</encoder>
</appender>

<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>sandbox.log</file>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg %mdc%n</pattern>
</encoder>
</appender>

<appender name="ASYNC" class="ch.qos.logback.classic.AsyncAppender">
<appender-ref ref="FILE"/>
</appender>

<!-- Disable noisy DB logging at the start of sandbox -->
<logger name="com.daml.platform.store.FlywayMigrations" level="WARN" />
<logger name="com.zaxxer.hikari" level="ERROR" />
<logger name="com.daml.ledger.on.sql" level="WARN" />
<logger name="com.daml.platform" level="WARN" />

<!-- Log progress of flyway migrations -->
<logger name="org.flywaydb" level="INFO" />

<!-- raising the command tracker logging level -->
<logger name="com.daml.platform.apiserver.services.tracking.TrackerMap" level="WARN" />

<!--
explicitly enabling the info logging for sandbox main and ledger api server
for the usual startup info logging (which port, dar files, etc...)
-->
<logger name="com.daml.platform.sandboxnext" level="INFO" />
<logger name="com.daml.platform.sandbox" level="INFO" />
<logger name="com.daml.platform.apiserver.LedgerApiServer" level="INFO" />

<root level="INFO">
<appender-ref ref="STDOUT"/>
<appender-ref ref="ASYNC"/>
</root>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<!-- Disable noisy DB logging at the start of sandbox -->
<logger name="com.daml.platform.store.FlywayMigrations" level="WARN" />
<logger name="org.flywaydb" level="ERROR" />
<logger name="org.flywaydb" level="INFO" />
<logger name="com.zaxxer.hikari" level="ERROR" />
<logger name="com.daml.platform" level="WARN" />

Expand Down

0 comments on commit adeba20

Please sign in to comment.