Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use DevX logs instead of kinesis-logback-appender #190

Merged
merged 1 commit into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions app/Loader.scala
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import story_packages.logging.LogStashConfig
import story_packages.metrics.CloudWatchApplicationMetrics
import play.api.ApplicationLoader.Context
import play.api.{Application, ApplicationLoader, Logger, LoggerConfigurator}
Expand All @@ -17,7 +16,6 @@ class Loader extends ApplicationLoader {
components.actorSystem.scheduler,
components.isDev
)
new LogStashConfig(components.config)
new SwitchboardLifecycle(SwitchboardConfiguration(
objectKey = components.config.switchBoard.objectKey,
bucket = components.config.switchBoard.bucket,
Expand Down
89 changes: 0 additions & 89 deletions app/story_packages/logging/LogStash.scala

This file was deleted.

14 changes: 0 additions & 14 deletions app/story_packages/logging/LogStashConfig.scala

This file was deleted.

1 change: 0 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ libraryDependencies ++= jacksonOverrides ++ Seq(
"com.gu" %% "content-api-models-json" % capiModelsVersion,
"com.gu" %% "content-api-client-aws" % "0.7",
"com.gu" %% "fapi-client-play28" % "4.0.4",
"com.gu" % "kinesis-logback-appender" % "1.3.0",
"com.gu" %% "pan-domain-auth-play_2-8" % "1.3.0",
"com.gu" %% "story-packages-model" % "2.2.0",
"com.gu" %% "thrift-serializer" % "4.0.0",
Expand Down
18 changes: 13 additions & 5 deletions conf/logback.xml
Original file line number Diff line number Diff line change
@@ -1,22 +1,30 @@
<configuration>

<contextName>story-packages</contextName>
<conversionRule conversionWord="coloredLevel" converterClass="play.api.libs.logback.ColoredLevel" />

<appender name="LOGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>logs/story-packages.log</file>
<file>logs/application.log</file>

<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>logs/story-packages.log.%d{yyyy-MM-dd}.gz</fileNamePattern>
<maxHistory>7</maxHistory>
<fileNamePattern>logs/application.log.%d{yyyy-MM-dd}.gz</fileNamePattern>
<maxHistory>2</maxHistory>
</rollingPolicy>

<encoder>
<pattern>%date [%thread] %-5level %logger{36} - %msg%n%xException{3}</pattern>
<pattern>%date - [%level] - from %logger in %thread %n%message%n%xException%n</pattern>
</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>

<logger name="com.google.api.client.http" level="WARN" />
Expand Down
2 changes: 1 addition & 1 deletion riff-raff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ deployments:
prependStackToCloudFormationStackName: false
cloudFormationStackName: story-packages
amiTags:
Recipe: editorial-tools-focal-java8-ARM
Recipe: editorial-tools-focal-java8-ARM-WITH-cdk-base
AmigoStage: PROD
amiParameter: MachineImageID

Expand Down
Loading