Skip to content

Commit

Permalink
Merge pull request #27403 from guardian/remove-kinesis-logback-appender
Browse files Browse the repository at this point in the history
Use devx-logs
  • Loading branch information
ioannakok authored Aug 23, 2024
2 parents 1673651 + f281430 commit 47d28f9
Show file tree
Hide file tree
Showing 34 changed files with 135 additions and 271 deletions.
3 changes: 0 additions & 3 deletions admin/app/AppLoader.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import app.{FrontendApplicationLoader, FrontendComponents, LifecycleComponent}
import com.softwaremill.macwire._
import common.Logback.{LogbackOperationsPool, LogstashLifecycle}
import dfp._
import common.dfp._
import common._
Expand Down Expand Up @@ -77,9 +76,7 @@ trait AppComponents extends FrontendComponents with AdminControllers with AdminS

lazy val healthCheck = wire[HealthCheck]
lazy val devAssetsController = wire[DevAssetsController]
lazy val logbackOperationsPool = wire[LogbackOperationsPool]
override lazy val lifecycleComponents: List[LifecycleComponent] = List(
wire[LogstashLifecycle],
wire[AdminLifecycle],
wire[ConfigAgentLifecycle],
wire[SwitchboardLifecycle],
Expand Down
9 changes: 9 additions & 0 deletions admin/conf/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,22 @@
</encoder>
</appender>

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="net.logstash.logback.encoder.LogstashEncoder" />
</appender>

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

<!-- DFP API logging -->
<logger name="com.google.api.ads.dfp.lib.client.DfpServiceClient.soapXmlLogger" level="WARN"/>
<logger name="com.google.api.client.http.HttpTransport" level="OFF"/>
<!-- END -->

<root level="INFO">
<appender-ref ref="LOGFILE"/>
<appender-ref ref="ASYNCSTDOUT"/>
</root>

</configuration>
3 changes: 0 additions & 3 deletions applications/app/AppLoader.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import common.dfp.DfpAgentLifecycle
import common.{ApplicationMetrics, CloudWatchMetricsLifecycle, ContentApiMetrics, DCRMetrics, EmailSubsciptionMetrics}
import _root_.commercial.targeting.TargetingLifecycle
import common.Assets.DiscussionExternalAssetsLifecycle
import common.Logback.{LogbackOperationsPool, LogstashLifecycle}
import conf.CachedHealthCheckLifeCycle
import conf.switches.SwitchboardLifecycle
import contentapi.{CapiHttpClient, ContentApiClient, HttpClient, SectionsLookUp, SectionsLookUpLifecycle}
Expand Down Expand Up @@ -51,10 +50,8 @@ trait AppComponents extends FrontendComponents with ApplicationsControllers with
lazy val emailSignupController = wire[EmailSignupController]
lazy val surveyPageController = wire[SurveyPageController]
lazy val signupPageController = wire[SignupPageController]
lazy val logbackOperationsPool = wire[LogbackOperationsPool]

override lazy val lifecycleComponents = List(
wire[LogstashLifecycle],
wire[ConfigAgentLifecycle],
wire[CloudWatchMetricsLifecycle],
wire[DfpAgentLifecycle],
Expand Down
9 changes: 9 additions & 0 deletions applications/conf/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,17 @@
</encoder>
</appender>

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="net.logstash.logback.encoder.LogstashEncoder" />
</appender>

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

<root level="INFO">
<appender-ref ref="LOGFILE"/>
<appender-ref ref="ASYNCSTDOUT"/>
</root>

</configuration>
3 changes: 0 additions & 3 deletions archive/app/AppLoader.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import http.{CommonFilters, CorsHttpErrorHandler}
import app.{FrontendApplicationLoader, FrontendBuildInfo, FrontendComponents}
import com.softwaremill.macwire._
import common._
import common.Logback.{LogbackOperationsPool, LogstashLifecycle}
import conf.switches.SwitchboardLifecycle
import conf.CachedHealthCheckLifeCycle
import controllers.{ArchiveController, HealthCheck}
Expand Down Expand Up @@ -31,10 +30,8 @@ trait AppComponents extends FrontendComponents {
lazy val devAssetsController = wire[DevAssetsController]
lazy val healthCheck = wire[HealthCheck]
lazy val archiveController = wire[ArchiveController]
lazy val logbackOperationsPool = wire[LogbackOperationsPool]

override lazy val lifecycleComponents = List(
wire[LogstashLifecycle],
wire[CloudWatchMetricsLifecycle],
wire[ArchiveMetrics],
wire[SwitchboardLifecycle],
Expand Down
9 changes: 9 additions & 0 deletions archive/conf/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,17 @@
</encoder>
</appender>

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="net.logstash.logback.encoder.LogstashEncoder" />
</appender>

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

<root level="INFO">
<appender-ref ref="LOGFILE"/>
<appender-ref ref="ASYNCSTDOUT"/>
</root>

</configuration>
3 changes: 0 additions & 3 deletions article/app/AppLoader.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import org.apache.pekko.actor.{ActorSystem => PekkoActorSystem}
import app.{FrontendApplicationLoader, FrontendBuildInfo, FrontendComponents}
import com.softwaremill.macwire._
import common.Assets.DiscussionExternalAssetsLifecycle
import common.Logback.{LogbackOperationsPool, LogstashLifecycle}
import common._
import common.dfp.DfpAgentLifecycle
import concurrent.BlockingOperations
Expand Down Expand Up @@ -41,12 +40,10 @@ trait AppComponents extends FrontendComponents with ArticleControllers {

lazy val healthCheck = wire[HealthCheck]
lazy val devAssetsController = wire[DevAssetsController]
lazy val logbackOperationsPool = wire[LogbackOperationsPool]

lazy val remoteRender = wire[renderers.DotcomRenderingService]

override lazy val lifecycleComponents = List(
wire[LogstashLifecycle],
wire[NewspaperBooksAndSectionsAutoRefresh],
wire[DfpAgentLifecycle],
wire[CloudWatchMetricsLifecycle],
Expand Down
9 changes: 9 additions & 0 deletions article/conf/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,17 @@
</encoder>
</appender>

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="net.logstash.logback.encoder.LogstashEncoder" />
</appender>

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

<root level="INFO">
<appender-ref ref="LOGFILE"/>
<appender-ref ref="ASYNCSTDOUT"/>
</root>

</configuration>
1 change: 0 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ val common = library("common")
cssParser,
w3cSac,
logback2, // logback2: to prevent "error: reference to logback is ambiguous;"
kinesisLogbackAppender,
targetingClient,
scanamo,
scalaUri,
Expand Down
3 changes: 0 additions & 3 deletions commercial/app/AppLoader.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import commercial.model.feeds.{FeedsFetcher, FeedsParser}
import commercial.model.merchandise.jobs.{Industries, JobsAgent}
import commercial.model.merchandise.travel.TravelOffersAgent
import common.CloudWatchMetricsLifecycle
import common.Logback.{LogbackOperationsPool, LogstashLifecycle}
import common.dfp.DfpAgentLifecycle
import conf.switches.SwitchboardLifecycle
import conf.CachedHealthCheckLifeCycle
Expand Down Expand Up @@ -52,10 +51,8 @@ trait AppComponents extends FrontendComponents with CommercialControllers with C

lazy val devAssetsController = wire[DevAssetsController]
lazy val healthCheck = wire[HealthCheck]
lazy val logbackOperationsPool = wire[LogbackOperationsPool]

override lazy val lifecycleComponents = List(
wire[LogstashLifecycle],
wire[CommercialLifecycle],
wire[DfpAgentLifecycle],
wire[SwitchboardLifecycle],
Expand Down
9 changes: 9 additions & 0 deletions commercial/conf/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,17 @@
</encoder>
</appender>

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="net.logstash.logback.encoder.LogstashEncoder" />
</appender>

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

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

</configuration>
63 changes: 0 additions & 63 deletions common/app/common/Logback/KinesisAdapter.scala

This file was deleted.

90 changes: 0 additions & 90 deletions common/app/common/Logback/LogbackConfig.scala

This file was deleted.

Loading

0 comments on commit 47d28f9

Please sign in to comment.