Skip to content

Commit

Permalink
Update Play to v2.9
Browse files Browse the repository at this point in the history
  • Loading branch information
niladic committed Oct 30, 2023
1 parent 652b5eb commit 496f9f3
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 48 deletions.
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ libraryDependencies += guice
libraryDependencies ++= Seq(
"org.postgresql" % "postgresql" % "42.6.0",
anormDependency,
"com.typesafe.play" %% "play-mailer" % "8.0.1",
"com.typesafe.play" %% "play-mailer" % "9.0.0",
"com.typesafe.play" %% "play-json" % "2.10.1",
"com.sun.mail" % "javax.mail" % "1.6.2",
"net.jcazevedo" %% "moultingyaml" % "0.4.2",
Expand All @@ -104,7 +104,7 @@ libraryDependencies ++= Seq(

// UI
libraryDependencies ++= Seq(
"org.webjars" %% "webjars-play" % "2.8.18",
"org.webjars" %% "webjars-play" % "2.9.0",
"org.webjars.bower" % "material-design-lite" % "1.3.0",
"org.webjars" % "material-design-icons" % "4.0.0",
"org.webjars.npm" % "roboto-fontface" % "0.10.0",
Expand Down
38 changes: 17 additions & 21 deletions conf/logback-test.xml
Original file line number Diff line number Diff line change
@@ -1,36 +1,32 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration>

<!-- https://www.playframework.com/documentation/latest/SettingsLogger -->
<configuration>
<import class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"/>
<import class="ch.qos.logback.core.ConsoleAppender"/>

<conversionRule conversionWord="coloredLevel" converterClass="play.api.libs.logback.ColoredLevel" />

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%coloredLevel %logger{15} - %message%n%xException{10}</pattern>
<appender name="STDOUT" class="ConsoleAppender">
<encoder class="PatternLayoutEncoder">
<pattern>%highlight(%-5level) %logger{15} - %message%n%xException{10}</pattern>
</encoder>
</appender>

<logger name="play" level="INFO" />
<logger name="application" level="DEBUG" />
<logger name="play" level="INFO"/>
<logger name="application" level="DEBUG"/>

<!-- Off these ones as they are annoying, and anyway we manage configuration ourselves -->
<logger name="com.avaje.ebean.config.PropertyMapLoader" level="OFF" />
<logger name="com.avaje.ebeaninternal.server.core.XmlConfigLoader" level="OFF" />
<logger name="com.avaje.ebeaninternal.server.lib.BackgroundThread" level="OFF" />
<logger name="com.gargoylesoftware.htmlunit.javascript" level="OFF" />
<logger name="play.filters.https.RedirectHttpsFilter" level="WARN" />
<logger name="com.gargoylesoftware.htmlunit.javascript" level="OFF"/>
<logger name="play.filters.https.RedirectHttpsFilter" level="WARN"/>

<!-- OFF some noisy logs for tests -->
<logger name="com.gargoylesoftware.htmlunit.DefaultCssErrorHandler" level="OFF" />
<logger name="com.zaxxer.hikari.HikariDataSource" level="OFF" />
<logger name="io.github.classgraph.ClassGraph" level="OFF" />


<logger name="com.gargoylesoftware.htmlunit.DefaultCssErrorHandler" level="OFF"/>
<logger name="com.zaxxer.hikari.HikariDataSource" level="OFF"/>
<logger name="io.github.classgraph.ClassGraph" level="OFF"/>

<root level="WARN">
<appender-ref ref="STDOUT" />
</root>
<root level="INFO">

<appender-ref ref="STDOUT"/>
</root>

<root level="INFO"/>
</configuration>
54 changes: 31 additions & 23 deletions conf/logback.xml
Original file line number Diff line number Diff line change
@@ -1,48 +1,56 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration>

<!-- https://www.playframework.com/documentation/latest/SettingsLogger -->
<configuration>

<conversionRule conversionWord="coloredLevel" converterClass="play.api.libs.logback.ColoredLevel" />

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%coloredLevel %d %logger{15} - %message%n%xException{10}</pattern>
<import class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"/>
<import class="ch.qos.logback.classic.AsyncAppender"/>
<import class="io.sentry.logback.SentryAppender"/>
<import class="ch.qos.logback.classic.filter.ThresholdFilter"/>
<import class="ch.qos.logback.core.ConsoleAppender"/>

<appender name="STDOUT" class="ConsoleAppender">
<encoder class="PatternLayoutEncoder">
<pattern>%highlight(%-5level) %d %logger{15} - %message%n%xException{10}</pattern>
</encoder>
</appender>

<appender name="ASYNCSTDOUT" class="ch.qos.logback.classic.AsyncAppender">
<appender-ref ref="STDOUT" />
<appender name="ASYNCSTDOUT" class="AsyncAppender">
<!-- increases the default queue size -->
<queueSize>512</queueSize>
<!-- don't discard messages -->
<discardingThreshold>0</discardingThreshold>
<!-- block when queue is full -->
<neverBlock>false</neverBlock>
<appender-ref ref="STDOUT"/>
</appender>

<logger name="play" level="INFO" />
<logger name="application" level="DEBUG" />
<logger name="play" level="INFO"/>
<logger name="application" level="DEBUG"/>

<!-- Off these ones as they are annoying, and anyway we manage configuration ourselves -->
<logger name="com.avaje.ebean.config.PropertyMapLoader" level="OFF" />
<logger name="com.avaje.ebeaninternal.server.core.XmlConfigLoader" level="OFF" />
<logger name="com.avaje.ebeaninternal.server.lib.BackgroundThread" level="OFF" />
<logger name="com.gargoylesoftware.htmlunit.javascript" level="OFF" />
<logger name="play.filters.https.RedirectHttpsFilter" level="WARN" />
<logger name="com.gargoylesoftware.htmlunit.javascript" level="OFF"/>
<logger name="play.filters.https.RedirectHttpsFilter" level="WARN"/>

<!-- Configure the Console appender -->
<appender name="Console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<appender name="Console" class="ConsoleAppender">
<encoder class="PatternLayoutEncoder">
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>

<!-- Configure the Sentry appender, overriding the logging threshold to the WARN level -->
<appender name="Sentry" class="io.sentry.logback.SentryAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<appender name="Sentry" class="SentryAppender">
<filter class="ThresholdFilter">
<level>WARN</level>
</filter>
</appender>

<root level="WARN">
<!--<appender-ref ref="ASYNCFILE" />-->
<appender-ref ref="ASYNCSTDOUT" />
<appender-ref ref="ASYNCSTDOUT"/>
</root>

<root level="INFO">
<appender-ref ref="Sentry" />
<appender-ref ref="Sentry"/>
</root>

</configuration>
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// The Play plugin
// Important note: when upgrading the play version, check that the correct minor version
// of jackson is set in build.sbt (with the patch version that is not vulnerable)
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.20")
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.9.0")
addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.10.0-RC1")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.9")
addSbtPlugin("com.typesafe.sbt" % "sbt-digest" % "1.1.4")
Expand Down
2 changes: 1 addition & 1 deletion test/browser/BaseSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ trait BaseSpec {

def webDriver: WebDriver = {
val options = new FirefoxOptions()
.setHeadless(true)
options.addArguments("--headless")
new FirefoxDriver(options)
}

Expand Down

0 comments on commit 496f9f3

Please sign in to comment.